redis_func_cache.policies.lru module#

Least Recently Used eviction cache policies.

final class redis_func_cache.policies.lru.LruClusterMultiplePolicy[source]#

Bases: LruScriptsMixin, PickleMd5HashMixin, BaseClusterMultiplePolicy

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

Inheritance diagram of LruClusterMultiplePolicy

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.lru.LruClusterPolicy[source]#

Bases: LruScriptsMixin, PickleMd5HashMixin, BaseClusterSinglePolicy

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

Inheritance diagram of LruClusterPolicy

All decorated functions share the same Redis key pair.

final class redis_func_cache.policies.lru.LruMultiplePolicy[source]#

Bases: LruScriptsMixin, PickleMd5HashMixin, BaseMultiplePolicy

LRU eviction policy, multiple key pairs.

Inheritance diagram of LruMultiplePolicy

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.lru.LruPolicy[source]#

Bases: LruScriptsMixin, PickleMd5HashMixin, BaseSinglePolicy

LRU eviction policy, single key pair.

Inheritance diagram of LruPolicy

All decorated functions share the same Redis key pair.

final class redis_func_cache.policies.lru.LruTClusterMultiplePolicy[source]#

Bases: LruTScriptsMixin, PickleMd5HashMixin, BaseClusterMultiplePolicy

LRU-T (timestamp-based pseudo LRU) eviction policy with Redis cluster support, multiple key pairs.

Inheritance diagram of LruTClusterMultiplePolicy

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.lru.LruTClusterPolicy[source]#

Bases: LruTScriptsMixin, PickleMd5HashMixin, BaseClusterSinglePolicy

LRU-T (timestamp-based pseudo LRU) eviction policy with Redis cluster support, single key pair.

Inheritance diagram of LruTClusterPolicy

All decorated functions share the same Redis key pair.

final class redis_func_cache.policies.lru.LruTMultiplePolicy[source]#

Bases: LruTScriptsMixin, PickleMd5HashMixin, BaseMultiplePolicy

LRU-T (timestamp-based pseudo LRU) eviction policy, multiple key pairs.

Inheritance diagram of LruTMultiplePolicy

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.lru.LruTPolicy[source]#

Bases: LruTScriptsMixin, PickleMd5HashMixin, BaseSinglePolicy

LRU-T (timestamp-based pseudo LRU) eviction policy, single key pair.

Inheritance diagram of LruTPolicy

All decorated functions share the same Redis key pair.