redis_func_cache.policies.rr module#
Random replacement eviction cache policy.
- final class redis_func_cache.policies.rr.RrClusterMultiplePolicy[source]#
Bases:
RrScriptsMixin,PickleMd5HashMixin,BaseClusterMultiplePolicyRandom replacement (RR) 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.rr.RrClusterPolicy[source]#
Bases:
RrScriptsMixin,PickleMd5HashMixin,BaseClusterSinglePolicyRandom replacement (RR) eviction policy with Redis cluster support, single key pair.
All decorated functions share the same Redis key pair.
- final class redis_func_cache.policies.rr.RrMultiplePolicy[source]#
Bases:
RrScriptsMixin,PickleMd5HashMixin,BaseMultiplePolicyRandom replacement (RR) 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.rr.RrPolicy[source]#
Bases:
RrScriptsMixin,PickleMd5HashMixin,BaseSinglePolicyRandom replacement (RR) eviction policy, single key pair.
All decorated functions share the same Redis key pair.