ahvn.klstore.cache_store module¶
- class ahvn.klstore.cache_store.CacheKLStore(cache, name=None, condition=None, *args, **kwargs)[source]¶
Bases:
BaseKLStoreKLStore implementation backed by a BaseCache instance. Stores BaseUKF objects in the cache, using kl.id as the key.
- Parameters:
- __init__(cache, name=None, condition=None, *args, **kwargs)[source]¶
Initialize CacheKLStore with a BaseCache instance.
- Parameters:
cache (BaseCache) – The cache backend to use.
name (
Optional[str]) – Name of the KLStore instance. If None, defaults to “default”.condition (
Optional[Callable]) – Optional upsert/insert condition to apply to the KLStore. KLs that do not satisfy the condition will be ignored. If None, all KLs are accepted.*args – Additional positional arguments for BaseKLStore.
**kwargs – Additional keyword arguments for BaseKLStore.