redis_func_cache.policies.lfu module#
LFU eviction policy.
- final class redis_func_cache.policies.lfu.LfuClusterMultiplePolicy[source]#
Bases:
LfuScriptsMixin,PickleMd5HashMixin,BaseClusterMultiplePolicyLFU 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.lfu.LfuClusterPolicy[source]#
Bases:
LfuScriptsMixin,PickleMd5HashMixin,BaseClusterSinglePolicyLFU eviction policy with Redis cluster support, single key pair.
All decorated functions share the same Redis key pair.
- final class redis_func_cache.policies.lfu.LfuMultiplePolicy[source]#
Bases:
LfuScriptsMixin,PickleMd5HashMixin,BaseMultiplePolicyLFU 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.lfu.LfuPolicy[source]#
Bases:
LfuScriptsMixin,PickleMd5HashMixin,BaseSinglePolicyLFU eviction policy, single key pair.
All decorated functions share the same Redis key pair.