ahvn.cache.in_mem_cache module¶

In-memory cache backend.

class ahvn.cache.in_mem_cache.InMemCache(exclude=None, *args, **kwargs)[source]¶

Bases: BaseCache

An implementation of BaseCache that stores data in memory as Python dictionaries.

Parameters:

exclude (Iterable[str] | None)

__init__(exclude=None, *args, **kwargs)[source]¶

Initialization.

Parameters:
  • exclude (Optional[Iterable[str]]) – Keys to exclude from inputs when creating cache entries.

  • *args – Additional positional arguments.

  • **kwargs – Additional keyword arguments.

close()[source]¶

Closes the cache, if applicable.