[docs]classDiskCacheStoreConfig(BaseModel):"""Configuration for DiskCacheStore"""directory:str# Path where cache is stored
# Could add other diskcache.Cache parameters like size_limit, etc.
[docs]classDiskCacheStore(CacheStore[T],Component[DiskCacheStoreConfig]):""" A typed CacheStore implementation that uses diskcache as the underlying storage. See :class:`~autogen_ext.models.cache.ChatCompletionCache` for an example of usage. Args: cache_instance: An instance of diskcache.Cache. The user is responsible for managing the DiskCache instance's lifetime. """component_config_schema=DiskCacheStoreConfigcomponent_provider_override="autogen_ext.cache_store.diskcache.DiskCacheStore"def__init__(self,cache_instance:diskcache.Cache):# type: ignore[no-any-unimported]self.cache=cache_instance