types
Classes:
-
CacheItem–A cache item.
-
ParamHashFunc–A function that generates a hash for the given parameters.
Attributes:
-
EVICTION_POLICIES(set[EvictionPolicy]) –A set of all possible eviction policies.
-
EvictionPolicy–Defines the possible eviction policies for the cache.
EVICTION_POLICIES
module-attribute
EVICTION_POLICIES: set[EvictionPolicy] = set(
get_args(EvictionPolicy)
)
A set of all possible eviction policies.
EvictionPolicy
module-attribute
EvictionPolicy = Literal[
"least-recently-used",
"least-frequently-used",
"most-recently-used",
"first-in-first-out",
"last-in-first-out",
]
Defines the possible eviction policies for the cache.