redis_func_cache.policies.mru module

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, BaseClusterMultiplePolicy

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

Inheritance diagram of MruClusterMultiplePolicy

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.mru.MruClusterPolicy[source]#

Bases: _MruPolicyExtArgsMixin, LruScriptsMixin, PickleMd5HashMixin, BaseClusterSinglePolicy

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

Inheritance diagram of MruClusterPolicy

All decorated functions share the same Redis key pair.

final class redis_func_cache.policies.mru.MruMultiplePolicy[source]#

Bases: _MruPolicyExtArgsMixin, LruScriptsMixin, PickleMd5HashMixin, BaseMultiplePolicy

MRU eviction policy, multiple key pairs.

Inheritance diagram of MruMultiplePolicy

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.mru.MruPolicy[source]#

Bases: _MruPolicyExtArgsMixin, LruScriptsMixin, PickleMd5HashMixin, BaseSinglePolicy

MRU eviction policy, single key pair.

Inheritance diagram of MruPolicy

All decorated functions share the same Redis key pair.