Repository URL to install this package:
|
Version:
2.5 ▾
|
ó
»EYc @ s< d Z d d l Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l
m Z d d l m
Z
d d
l m Z d d d
d d g Z e j Z e j e Z d e j f d YZ d Z d Z d Z d Z d Z d Z d Z e d Z d d Z d Z d S( sX Caching Layer Implementation.
To use this library:
You must call :func:`configure`.
Inside your application code, decorate the methods that you want the results
to be cached with a memoization decorator created with
:func:`get_memoization_decorator`. This function takes a group name from the
config. Register [`group`] ``caching`` and [`group`] ``cache_time`` options
for the groups that your decorators use so that caching can be configured.
This library's configuration options must be registered in your application's
:class:`oslo_config.cfg.ConfigOpts` instance. Do this by passing the ConfigOpts
instance to :func:`configure`.
The library has special public value for nonexistent or expired keys called
:data:`NO_VALUE`. To use this value you should import it from oslo_cache.core::
from oslo_cache import core
NO_VALUE = core.NO_VALUE
iÿÿÿÿN( t api( t proxy( t util( t log( t importutils( t _( t _opts( t exceptiont configuret configure_cache_regiont
create_regiont get_memoization_decoratort NO_VALUEt _DebugProxyc B sD e Z d Z d Z d Z d Z d Z d Z d Z RS( s Extra Logging ProxyBackend.c C s4 | j j | } t j d i | d 6| d 6 | S( Ns, CACHE_GET: Key: "%(key)r" Value: "%(value)r"t keyt value( t proxiedt gett _LOGt debug( t selfR R ( ( sD /home/tvault/.virtenv/lib/python2.7/site-packages/oslo_cache/core.pyR H s c C s4 | j j | } t j d i | d 6| d 6 | S( Ns0 CACHE_GET_MULTI: "%(keys)r" Values: "%(values)r"t keyst values( R t get_multiR R ( R R R ( ( sD /home/tvault/.virtenv/lib/python2.7/site-packages/oslo_cache/core.pyR N s c C s1 t j d i | d 6| d 6 | j j | | S( Ns, CACHE_SET: Key: "%(key)r" Value: "%(value)r"R R ( R R R t set( R R R ( ( sD /home/tvault/.virtenv/lib/python2.7/site-packages/oslo_cache/core.pyR T s c C s$ t j d | | j j | d S( Ns CACHE_SET_MULTI: "%r"( R R R t set_multi( R R ( ( sD /home/tvault/.virtenv/lib/python2.7/site-packages/oslo_cache/core.pyR Y s c C s$ | j j | t j d | d S( Ns CACHE_DELETE: "%r"( R t deleteR R ( R R ( ( sD /home/tvault/.virtenv/lib/python2.7/site-packages/oslo_cache/core.pyR ] s c C s$ t j d | | j j | d S( Ns CACHE_DELETE_MULTI: "%r"( R R R t delete_multi( R R ( ( sD /home/tvault/.virtenv/lib/python2.7/site-packages/oslo_cache/core.pyR a s ( t __name__t
__module__t __doc__R R R R R R ( ( ( sD /home/tvault/.virtenv/lib/python2.7/site-packages/oslo_cache/core.pyR
@ s c
C sK | j j } i } t j | d | <| j j t k rL | j j | d | <n | j j | d | <x | j j D] } y | j d d \ } } Wn* t
k
r» d } t j | | qm n Xd j
| d | g } | | | <t j d | qm W| j d | | j j x8 d D]0 } t | j d | } | | d | | f <qW| S( sI Build the cache region dictionary configuration.
:returns: dict
s
%s.backends %s.expiration_timet :i sb Unable to build cache config-key. Expected format "<argname>:<value>". Skipping unknown format: %st .t argumentss Oslo Cache Config: %ss %s.arguments.urlt
dead_retryt socket_timeoutt pool_maxsizet pool_unused_timeoutt pool_connection_get_timeoutt memcache_s %s.arguments.%s( R" s socket_timeoutR$ R% R&