Home / Function/ pruneCache() — vue Function Reference

pruneCache() — vue Function Reference

Architecture documentation for the pruneCache() function in keep-alive.ts from the vue codebase.

Function typescript VueCore GlobalAPI calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  77419fcd_c2e3_1f02_2ca7_dcad21d4be11["pruneCache()"]
  302828a5_7155_979e_f7d9_5b26a70fd7d0["keep-alive.ts"]
  77419fcd_c2e3_1f02_2ca7_dcad21d4be11 -->|defined in| 302828a5_7155_979e_f7d9_5b26a70fd7d0
  64fb886a_b184_1d61_f5f0_e81d03183da4["default.mounted()"]
  64fb886a_b184_1d61_f5f0_e81d03183da4 -->|calls| 77419fcd_c2e3_1f02_2ca7_dcad21d4be11
  39fa8cb8_8bff_6bf6_3fde_5a4e81ade2b6["pruneCacheEntry()"]
  77419fcd_c2e3_1f02_2ca7_dcad21d4be11 -->|calls| 39fa8cb8_8bff_6bf6_3fde_5a4e81ade2b6
  style 77419fcd_c2e3_1f02_2ca7_dcad21d4be11 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/core/components/keep-alive.ts lines 35–55

function pruneCache(
  keepAliveInstance: {
    cache: CacheEntryMap
    keys: string[]
    _vnode: VNode
    $vnode: VNode
  },
  filter: Function
) {
  const { cache, keys, _vnode, $vnode } = keepAliveInstance
  for (const key in cache) {
    const entry = cache[key]
    if (entry) {
      const name = entry.name
      if (name && !filter(name)) {
        pruneCacheEntry(cache, key, keys, _vnode)
      }
    }
  }
  $vnode.componentOptions!.children = undefined
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does pruneCache() do?
pruneCache() is a function in the vue codebase, defined in src/core/components/keep-alive.ts.
Where is pruneCache() defined?
pruneCache() is defined in src/core/components/keep-alive.ts at line 35.
What does pruneCache() call?
pruneCache() calls 1 function(s): pruneCacheEntry.
What calls pruneCache()?
pruneCache() is called by 1 function(s): default.mounted.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free