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

Function create_cache

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

Return the cache class for the given size.

(
    size: int,
)

Source from the content-addressed store, hash-verified

78
79
80def create_cache(
81 size: int,
82) -> t.Optional[t.MutableMapping[t.Tuple[weakref.ref, str], "Template"]]:
83 """Return the cache class for the given size."""
84 if size == 0:
85 return None
86
87 if size < 0:
88 return {}
89
90 return LRUCache(size) # type: ignore
91
92
93def copy_cache(

Callers 2

__init__Method · 0.70
overlayMethod · 0.70

Calls 1

LRUCacheClass · 0.70

Tested by

no test coverage detected