mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
fix default ttl for InMemoryCache
This commit is contained in:
parent
b900200c58
commit
05fe43f495
1 changed files with 2 additions and 2 deletions
|
|
@ -69,7 +69,7 @@ class InMemoryCache(BaseCache):
|
|||
max_size_in_memory: Optional[int] = 200,
|
||||
default_ttl: Optional[
|
||||
int
|
||||
] = 300, # default ttl is 5 minutes. At maximum litellm rate limiting logic requires objects to be in memory for 1 minute
|
||||
] = 600, # default ttl is 10 minutes. At maximum litellm rate limiting logic requires objects to be in memory for 1 minute
|
||||
):
|
||||
"""
|
||||
max_size_in_memory [int]: Maximum number of items in cache. done to prevent memory leaks. Use 200 items as a default
|
||||
|
|
@ -77,7 +77,7 @@ class InMemoryCache(BaseCache):
|
|||
self.max_size_in_memory = (
|
||||
max_size_in_memory or 200
|
||||
) # set an upper bound of 200 items in-memory
|
||||
self.default_ttl = default_ttl or 300
|
||||
self.default_ttl = default_ttl or 600
|
||||
|
||||
# in-memory cache
|
||||
self.cache_dict: dict = {}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue