redis_func_cache.policies.lru module#
Least Recently Used eviction cache policies.
- final class redis_func_cache.policies.lru.LruClusterMultiplePolicy[source]#
Bases:
LruScriptsMixin,PickleMd5HashMixin,BaseClusterMultiplePolicyLRU eviction policy with Redis cluster support, multiple key pairs.
Each decorated function has its own Redis key pair.
- Parameters:
cache – Optional weakref proxy to the
RedisFuncCacheinstance using this policy.
Note
The cache argument may be omitted when instantiating a policy. The RedisFuncCache will bind itself to the policy instance by setting this attribute to a weakref proxy during cache construction.
- final class redis_func_cache.policies.lru.LruClusterPolicy[source]#
Bases:
LruScriptsMixin,PickleMd5HashMixin,BaseClusterSinglePolicyLRU eviction policy with Redis cluster support, single key pair.
All decorated functions share the same Redis key pair.
- final class redis_func_cache.policies.lru.LruMultiplePolicy[source]#
Bases:
LruScriptsMixin,PickleMd5HashMixin,BaseMultiplePolicyLRU eviction policy, multiple key pairs.
Each decorated function has its own Redis key pair.
- Parameters:
cache – Optional weakref proxy to the
RedisFuncCacheinstance using this policy.
Note
The cache argument may be omitted when instantiating a policy. The RedisFuncCache will bind itself to the policy instance by setting this attribute to a weakref proxy during cache construction.
- final class redis_func_cache.policies.lru.LruPolicy[source]#
Bases:
LruScriptsMixin,PickleMd5HashMixin,BaseSinglePolicyLRU eviction policy, single key pair.
All decorated functions share the same Redis key pair.
- final class redis_func_cache.policies.lru.LruTClusterMultiplePolicy[source]#
Bases:
LruTScriptsMixin,PickleMd5HashMixin,BaseClusterMultiplePolicyLRU-T (timestamp-based pseudo LRU) eviction policy with Redis cluster support, multiple key pairs.
Each decorated function has its own Redis key pair.
- Parameters:
cache – Optional weakref proxy to the
RedisFuncCacheinstance using this policy.
Note
The cache argument may be omitted when instantiating a policy. The RedisFuncCache will bind itself to the policy instance by setting this attribute to a weakref proxy during cache construction.
- final class redis_func_cache.policies.lru.LruTClusterPolicy[source]#
Bases:
LruTScriptsMixin,PickleMd5HashMixin,BaseClusterSinglePolicyLRU-T (timestamp-based pseudo LRU) eviction policy with Redis cluster support, single key pair.
All decorated functions share the same Redis key pair.
- final class redis_func_cache.policies.lru.LruTMultiplePolicy[source]#
Bases:
LruTScriptsMixin,PickleMd5HashMixin,BaseMultiplePolicyLRU-T (timestamp-based pseudo LRU) eviction policy, multiple key pairs.
Each decorated function has its own Redis key pair.
- Parameters:
cache – Optional weakref proxy to the
RedisFuncCacheinstance using this policy.
Note
The cache argument may be omitted when instantiating a policy. The RedisFuncCache will bind itself to the policy instance by setting this attribute to a weakref proxy during cache construction.
- final class redis_func_cache.policies.lru.LruTPolicy[source]#
Bases:
LruTScriptsMixin,PickleMd5HashMixin,BaseSinglePolicyLRU-T (timestamp-based pseudo LRU) eviction policy, single key pair.
All decorated functions share the same Redis key pair.