keystone.common.kvs.backends package

Submodules

keystone.common.kvs.backends.inmemdb module

Keystone In-Memory Dogpile.cache backend implementation.

class keystone.common.kvs.backends.inmemdb.MemoryBackend(arguments)[source]

Bases: dogpile.cache.api.CacheBackend

A backend that uses a plain dictionary.

There is no size management, and values which are placed into the dictionary will remain until explicitly removed. Note that Dogpile’s expiration of items is based on timestamps and does not remove them from the cache.

E.g.:

from dogpile.cache import make_region

region = make_region().configure(
    'keystone.common.kvs.Memory'
)
delete(key)[source]
delete_multi(keys)[source]
get(key)[source]
get_multi(keys)[source]
set(key, value)[source]
set_multi(mapping)[source]

keystone.common.kvs.backends.memcached module

Keystone Memcached dogpile.cache backend implementation.

class keystone.common.kvs.backends.memcached.MemcachedBackend(arguments)[source]

Bases: object

Pivot point to leverage the various dogpile.cache memcached backends.

To specify a specific dogpile.cache memcached backend, pass the argument memcached_backend set to one of the provided memcached backends (at this time memcached, bmemcached, pylibmc and pooled_memcached are valid).

classmethod from_config_dict(config_dict, prefix)[source]
get_mutex(key)[source]
key_mangler[source]
set(key, value)[source]
set_multi(mapping)[source]
class keystone.common.kvs.backends.memcached.MemcachedLock(client_fn, key, lock_timeout, max_lock_attempts)[source]

Bases: object

Simple distributed lock using memcached.

This is an adaptation of the lock featured at http://amix.dk/blog/post/19386

acquire(wait=True)[source]
release()[source]

Module contents