redis_func_cache.policies.lfu module

redis_func_cache.policies.lfu module#

LFU eviction policy.

final class redis_func_cache.policies.lfu.LfuClusterMultiplePolicy[source]#

Bases: LfuScriptsMixin, PickleMd5HashMixin, BaseClusterMultiplePolicy

LFU eviction policy with Redis cluster support, multiple key pairs.

Inheritance diagram of LfuClusterMultiplePolicy

Each decorated function has its own Redis key pair.

Parameters:

cache – Optional weakref proxy to the RedisFuncCache instance 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, BaseClusterSinglePolicy

LFU eviction policy with Redis cluster support, single key pair.

Inheritance diagram of LfuClusterPolicy

All decorated functions share the same Redis key pair.

final class redis_func_cache.policies.lfu.LfuMultiplePolicy[source]#

Bases: LfuScriptsMixin, PickleMd5HashMixin, BaseMultiplePolicy

LFU eviction policy, multiple key pairs.

Inheritance diagram of LfuMultiplePolicy

Each decorated function has its own Redis key pair.

Parameters:

cache – Optional weakref proxy to the RedisFuncCache instance 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, BaseSinglePolicy

LFU eviction policy, single key pair.

Inheritance diagram of LfuPolicy

All decorated functions share the same Redis key pair.