Cache Module
Caching functionality
get_cache(path=None, ttl_days=None, max_size=None)
Create a persistent cache.
Default caching functionality can be controlled with environment variables:
WBDATA_CACHE_PATH
: path for the cache (default: system default application cache)WBDATA_CACHE_TTL_DAYS
: number of days to cache results (default: 7)WBDATA_CACHE_MAX_SIZE
: maximum number of items to cache (default: 100)
The cache returned is a shelved_cache.PersistentCache
that wraps a
cachetools.TTLCache
object with the desired parameters. The cache
is cleaned up on load.
Parameters: |
|
---|