Ask a question to get started
Enter to sendā¢Shift+Enter new line
MomentoCache( self, cache_client: momento.CacheClient, cache_name: str, *, ttl: Optional[timedelta
BaseCache
cache_client
CacheClient
The Momento cache client.
cache_name
str
The name of the cache to use to store the data.
ttl
Optional[timedelta]
None
The time to live for the cache items. Defaults to None, ie use the client default TTL.
ensure_cache_exists
bool
True
Construct cache from CacheClient parameters.
Lookup llm generations in cache by prompt and associated model and settings.
Store llm generations in cache.
Clear the cache.
Cache that uses Momento as a backend. See https://gomomento.com/
Create the cache if it doesn't exist. Defaults to True.