ahvn.klstore.cache_store module¶
- class ahvn.klstore.cache_store.CacheKLStore(cache, name=None, condition=None, *args, **kwargs)[源代码]¶
基类:
BaseKLStoreKLStore implementation backed by a BaseCache instance. Stores BaseUKF objects in the cache, using kl.id as the key.
- 参数:
- __init__(cache, name=None, condition=None, *args, **kwargs)[源代码]¶
Initialize CacheKLStore with a BaseCache instance.
- 参数:
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.