ExpiringCache#
- class ExpiringCache(cache_client, check_expired_interval=300, scheduler=None)#
Bases:
CacheWithExpiration
Wrapper for the cache client to implement keys expiration.
Every time the cache is touched (set, get, delete, exists, expire) it checks for expired keys and clean them. The cleaning doesn’t run more often than specified in the check_expired_interval parameter.
Scheduler parameter may be provided to register the cleaning task to the scheduler.
Attributes Summary
Methods Summary
Attributes Documentation
- SCHEDULER_TASK_PREFIX = 'expiring_cache_task_'#
Methods Documentation