MCPcopy Create free account
hub / github.com/nodejs/node / copy_cache

Function copy_cache

deps/v8/third_party/jinja2/environment.py:93–103  ·  view source on GitHub ↗

Create an empty copy of the given cache.

(
    cache: t.Optional[t.MutableMapping],
)

Source from the content-addressed store, hash-verified

91
92
93def copy_cache(
94 cache: t.Optional[t.MutableMapping],
95) -> t.Optional[t.MutableMapping[t.Tuple[weakref.ref, str], "Template"]]:
96 """Create an empty copy of the given cache."""
97 if cache is None:
98 return None
99
100 if type(cache) is dict:
101 return {}
102
103 return LRUCache(cache.capacity) # type: ignore
104
105
106def load_extensions(

Callers 1

overlayMethod · 0.70

Calls 2

LRUCacheClass · 0.70
typeFunction · 0.50

Tested by

no test coverage detected