Home / Function/ pruneCacheEntry() — vue Function Reference

pruneCacheEntry() — vue Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  0c5a4512_ccff_9122_41ec_ebf613756470["pruneCacheEntry()"]
  c226f635_6859_925d_9a26_e6726adfd678["pruneCache()"]
  c226f635_6859_925d_9a26_e6726adfd678 -->|calls| 0c5a4512_ccff_9122_41ec_ebf613756470
  ac6356a2_2b0a_9060_97ad_336b76e943af["default.destroyed()"]
  ac6356a2_2b0a_9060_97ad_336b76e943af -->|calls| 0c5a4512_ccff_9122_41ec_ebf613756470
  5670215c_12e8_f1ac_96f5_43fa02f28d30["remove()"]
  0c5a4512_ccff_9122_41ec_ebf613756470 -->|calls| 5670215c_12e8_f1ac_96f5_43fa02f28d30
  style 0c5a4512_ccff_9122_41ec_ebf613756470 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/core/components/keep-alive.ts lines 57–70

function pruneCacheEntry(
  cache: CacheEntryMap,
  key: string,
  keys: Array<string>,
  current?: VNode
) {
  const entry = cache[key]
  if (entry && (!current || entry.tag !== current.tag)) {
    // @ts-expect-error can be undefined
    entry.componentInstance.$destroy()
  }
  cache[key] = null
  remove(keys, key)
}

Domain

Subdomains

Calls

Frequently Asked Questions

What does pruneCacheEntry() do?
pruneCacheEntry() is a function in the vue codebase.
What does pruneCacheEntry() call?
pruneCacheEntry() calls 1 function(s): remove.
What calls pruneCacheEntry()?
pruneCacheEntry() is called by 2 function(s): default.destroyed, pruneCache.

Analyze Your Own Codebase

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

Try Supermodel Free