redis_func_cache.policies.mru module#
Most Recently Used eviction cache policies.
- final class redis_func_cache.policies.mru.MruClusterMultiplePolicy[source]#
Bases:
_MruPolicyExtArgsMixin,LruScriptsMixin,PickleMd5HashMixin,BaseClusterMultiplePolicyMRU 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.mru.MruClusterPolicy[source]#
Bases:
_MruPolicyExtArgsMixin,LruScriptsMixin,PickleMd5HashMixin,BaseClusterSinglePolicyMRU eviction policy with Redis cluster support, single key pair.
All decorated functions share the same Redis key pair.
- final class redis_func_cache.policies.mru.MruMultiplePolicy[source]#
Bases:
_MruPolicyExtArgsMixin,LruScriptsMixin,PickleMd5HashMixin,BaseMultiplePolicyMRU 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.mru.MruPolicy[source]#
Bases:
_MruPolicyExtArgsMixin,LruScriptsMixin,PickleMd5HashMixin,BaseSinglePolicyMRU eviction policy, single key pair.
All decorated functions share the same Redis key pair.