dogpile.cache backend that uses dictionary for storage
oslo_cache.backends.dictionary.
DictCacheBackend
(arguments)¶Bases: dogpile.cache.api.CacheBackend
A DictCacheBackend based on dictionary.
Arguments accepted in the arguments dictionary:
Parameters: | expiration_time (real) – interval in seconds to indicate maximum time-to-live value for each key in DictCacheBackend. Default expiration_time value is 0, that means that all keys have infinite time-to-live value. |
---|
delete
(key)¶Deletes the value associated with the key if it exists.
Parameters: | key – dictionary key |
---|
delete_multi
(keys)¶Deletes the value associated with each key in list if it exists.
Parameters: | keys – list of dictionary keys |
---|
get
(key)¶Retrieves the value for a key.
Parameters: | key – dictionary key |
---|---|
Returns: | value for a key or oslo_cache.core.NO_VALUE
for nonexistent or expired keys. |
get_multi
(keys)¶Retrieves the value for a list of keys.
set
(key, value)¶Sets the value for a key.
Expunges expired keys during each set.
Parameters: |
|
---|
set_multi
(mapping)¶Set multiple values in the cache. Expunges expired keys during each set.
Parameters: | mapping – dictionary with key/value pairs |
---|
dogpile.cache backend that uses etcd 3.x for storage
oslo_cache.backends.etcd3gw.
Etcd3gwCacheBackend
(arguments)¶Bases: dogpile.cache.api.CacheBackend
DEFAULT_HOST
= 'localhost'¶Default hostname used when none is provided.
DEFAULT_PORT
= 2379¶Default port used if none provided (4001 or 2379 are the common ones).
DEFAULT_TIMEOUT
= 30¶Default socket/lock/member/leader timeout used when none is provided.
delete
(key)¶delete_multi
(keys)¶get
(key)¶get_multi
(keys)¶Retrieves the value for a list of keys.
set
(key, value)¶set_multi
(mapping)¶dogpile.cache backend that uses Memcached connection pool
oslo_cache.backends.memcache_pool.
PooledMemcachedBackend
(arguments)¶Bases: dogpile.cache.backends.memcached.MemcachedBackend
Memcached backend that does connection pooling.
client
¶oslo_cache.backends.mongo.
MongoCacheBackend
(arguments)¶Bases: dogpile.cache.api.CacheBackend
A MongoDB based caching backend implementing dogpile backend APIs.
Arguments accepted in the arguments dictionary:
Parameters: |
|
---|
Following are optional parameters for MongoDB backend configuration,
Parameters: |
|
---|
Rest of arguments are passed to mongo calls for read, write and remove. So related options can be specified to pass to these operations.
Further details of various supported arguments can be referred from <http://api.mongodb.org/python/current/api/pymongo/>
client
¶Initializes MongoDB connection and collection defaults.
This initialization is done only once and performed as part of lazy inclusion of MongoDB dependency i.e. add imports only if related backend is used.
Returns: | MongoApi instance |
---|
delete
(key)¶delete_multi
(keys)¶get
(key)¶Retrieves the value for a key.
Parameters: | key – key to be retrieved. |
---|---|
Returns: | value for a key or oslo_cache.core.NO_VALUE
for nonexistent or expired keys. |
get_multi
(keys)¶Return multiple values from the cache, based on the given keys.
Parameters: | keys – sequence of keys to be retrieved. |
---|---|
Returns: | returns values (or oslo_cache.core.NO_VALUE )
as a list matching the keys given. |
set
(key, value)¶set_multi
(mapping)¶Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.