More sensible default values for cache autotrim (1k entries, 1min)
This commit is contained in:
		@@ -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
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user