Configuration Options

oslo.cache uses oslo.config to define and manage configuration options to allow the deployer to control how an application uses this library.

cache

config_prefix
Type

string

Default

cache.oslo

Prefix for building the configuration dictionary for the cache region. This should not need to be changed unless there is another dogpile.cache region with the same configuration name.

expiration_time
Type

integer

Default

600

Default TTL, in seconds, for any cached item in the dogpile.cache region. This applies to any cached method that doesn’t have an explicit cache expiration time defined for it.

backend
Type

string

Default

dogpile.cache.null

Valid Values

oslo_cache.memcache_pool, oslo_cache.dict, oslo_cache.mongo, oslo_cache.etcd3gw, dogpile.cache.pymemcache, dogpile.cache.memcached, dogpile.cache.pylibmc, dogpile.cache.bmemcached, dogpile.cache.dbm, dogpile.cache.redis, dogpile.cache.memory, dogpile.cache.memory_pickle, dogpile.cache.null

Cache backend module. For eventlet-based or environments with hundreds of threaded servers, Memcache with pooling (oslo_cache.memcache_pool) is recommended. For environments with less than 100 threaded servers, Memcached (dogpile.cache.memcached) or Redis (dogpile.cache.redis) is recommended. Test environments with a single instance of the server can use the dogpile.cache.memory backend.

backend_argument
Type

multi-valued

Default

''

Arguments supplied to the backend module. Specify this option once per argument to be passed to the dogpile.cache backend. Example format: “<argname>:<value>”.

proxies
Type

list

Default

[]

Proxy classes to import that will affect the way the dogpile.cache backend functions. See the dogpile.cache documentation on changing-backend-behavior.

enabled
Type

boolean

Default

False

Global toggle for caching.

debug_cache_backend
Type

boolean

Default

False

Extra debugging from the cache backend (cache keys, get/set/delete/etc calls). This is only really useful if you need to see the specific cache-backend get/set/delete calls with the keys/values. Typically this should be left set to false.

memcache_servers
Type

list

Default

['localhost:11211']

Memcache servers in the format of “host:port”. (dogpile.cache.memcached and oslo_cache.memcache_pool backends only). If a given host refer to an IPv6 or a given domain refer to IPv6 then you should prefix the given address with the address family (inet6) (e.g inet6[::1]:11211, inet6:[fd12:3456:789a:1::1]:11211, inet6:[controller-0.internalapi]:11211). If the address family is not given then default address family used will be inet which correspond to IPv4

memcache_dead_retry
Type

integer

Default

300

Number of seconds memcached server is considered dead before it is tried again. (dogpile.cache.memcache and oslo_cache.memcache_pool backends only).

memcache_socket_timeout
Type

floating point

Default

1.0

Timeout in seconds for every call to a server. (dogpile.cache.memcache and oslo_cache.memcache_pool backends only).

memcache_pool_maxsize
Type

integer

Default

10

Max total number of open connections to every memcached server. (oslo_cache.memcache_pool backend only).

memcache_pool_unused_timeout
Type

integer

Default

60

Number of seconds a connection to memcached is held unused in the pool before it is closed. (oslo_cache.memcache_pool backend only).

memcache_pool_connection_get_timeout
Type

integer

Default

10

Number of seconds that an operation will wait to get a memcache client connection.

memcache_pool_flush_on_reconnect
Type

boolean

Default

False

Global toggle if memcache will be flushed on reconnect. (oslo_cache.memcache_pool backend only).

tls_enabled
Type

boolean

Default

False

Global toggle for TLS usage when comunicating with the caching servers.

tls_cafile
Type

string

Default

<None>

Path to a file of concatenated CA certificates in PEM format necessary to establish the caching servers’ authenticity. If tls_enabled is False, this option is ignored.

tls_certfile
Type

string

Default

<None>

Path to a single file in PEM format containing the client’s certificate as well as any number of CA certificates needed to establish the certificate’s authenticity. This file is only required when client side authentication is necessary. If tls_enabled is False, this option is ignored.

tls_keyfile
Type

string

Default

<None>

Path to a single file containing the client’s private key in. Otherwhise the private key will be taken from the file specified in tls_certfile. If tls_enabled is False, this option is ignored.

tls_allowed_ciphers
Type

string

Default

<None>

Set the available ciphers for sockets created with the TLS context. It should be a string in the OpenSSL cipher list format. If not specified, all OpenSSL enabled ciphers will be available.

enable_socket_keepalive
Type

boolean

Default

False

Global toggle for the socket keepalive of dogpile’s pymemcache backend

socket_keepalive_idle
Type

integer

Default

1

Minimum Value

0

The time (in seconds) the connection needs to remain idle before TCP starts sending keepalive probes. Should be a positive integer most greater than zero.

socket_keepalive_interval
Type

integer

Default

1

Minimum Value

0

The time (in seconds) between individual keepalive probes. Should be a positive integer greater than zero.

socket_keepalive_count
Type

integer

Default

1

Minimum Value

0

The maximum number of keepalive probes TCP should send before dropping the connection. Should be a positive integer greater than zero.

enable_retry_client
Type

boolean

Default

False

Enable retry client mechanisms to handle failure. Those mechanisms can be used to wrap all kind of pymemcache clients. The wrapper allows you to define how many attempts to make and how long to wait between attemots.

retry_attempts
Type

integer

Default

2

Minimum Value

1

Number of times to attempt an action before failing.

retry_delay
Type

floating point

Default

0

Number of seconds to sleep between each attempt.

hashclient_retry_attempts
Type

integer

Default

2

Minimum Value

1

Amount of times a client should be tried before it is marked dead and removed from the pool in the HashClient’s internal mechanisms.

hashclient_retry_delay
Type

floating point

Default

1

Time in seconds that should pass between retry attempts in the HashClient’s internal mechanisms.

dead_timeout
Type

floating point

Default

60

Time in seconds before attempting to add a node back in the pool in the HashClient’s internal mechanisms.