redis_func_cache.policies.rr module

redis_func_cache.policies.rr module#

Random replacement eviction cache policy.

final class redis_func_cache.policies.rr.RrClusterMultiplePolicy[source]#

Bases: RrScriptsMixin, PickleMd5HashMixin, BaseClusterMultiplePolicy

Random replacement (RR) eviction policy with Redis cluster support, multiple key pairs.

Inheritance diagram of RrClusterMultiplePolicy

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.rr.RrClusterPolicy[source]#

Bases: RrScriptsMixin, PickleMd5HashMixin, BaseClusterSinglePolicy

Random replacement (RR) eviction policy with Redis cluster support, single key pair.

Inheritance diagram of RrClusterPolicy

All decorated functions share the same Redis key pair.

final class redis_func_cache.policies.rr.RrMultiplePolicy[source]#

Bases: RrScriptsMixin, PickleMd5HashMixin, BaseMultiplePolicy

Random replacement (RR) eviction policy, multiple key pairs.

Inheritance diagram of RrMultiplePolicy

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.rr.RrPolicy[source]#

Bases: RrScriptsMixin, PickleMd5HashMixin, BaseSinglePolicy

Random replacement (RR) eviction policy, single key pair.

Inheritance diagram of RrPolicy

All decorated functions share the same Redis key pair.