autogen_ext.cache_store.diskcache#
- class DiskCacheStore(cache_instance: Cache)[source]#
- Bases: - CacheStore[- T]- A typed CacheStore implementation that uses diskcache as the underlying storage. See - ChatCompletionCachefor an example of usage.- Parameters:
- cache_instance – An instance of diskcache.Cache. The user is responsible for managing the DiskCache instance’s lifetime. 
 - get(key: str, default: T | None = None) T | None[source]#
- Retrieve an item from the store. - Parameters:
- key – The key identifying the item in the store. 
- default (optional) – The default value to return if the key is not found. Defaults to None. 
 
- Returns:
- The value associated with the key if found, else the default value.