More sensible default values for cache autotrim (1k entries, 1min)

master
pictuga 2020-10-03 19:55:57 +02:00
parent 2514fabd38
commit 8abd951d40
2 changed files with 4 additions and 5 deletions

View File

@ -376,10 +376,10 @@ environment variables: `MYSQL_USER`, `MYSQL_PWD`, `MYSQL_DB`, `MYSQL_HOST`
To limit the size of the cache:
- `CACHE_SIZE` sets the target number of items in the cache (further items will
be deleted but the cache might be temporarily bigger than that). Defaults to 10k
be deleted but the cache might be temporarily bigger than that). Defaults to 1k
entries.
- `CACHE_LIFESPAN` sets how often the cache must be trimmed (i.e. cut down to
the number of items set in `CACHE_SIZE`). Defaults to 1hr.
the number of items set in `CACHE_SIZE`). Defaults to 1min.
### Content matching

View File

@ -50,9 +50,8 @@ except NameError:
basestring = unicode = str
CACHE_SIZE = int(os.getenv('CACHE_SIZE', 10000)) # max number of items in cache (default: 10k items)
CACHE_LIFESPAN = int(os.getenv('CACHE_LIFESPAN', 60*60)) # how often to auto-clear the cache (default: 1hr)
CACHE_SIZE = int(os.getenv('CACHE_SIZE', 1000)) # max number of items in cache (default: 1k items)
CACHE_LIFESPAN = int(os.getenv('CACHE_LIFESPAN', 60)) # how often to auto-clear the cache (default: 1min)
# uncomment the lines below to ignore SSL certs
#import ssl