Package buildbot :: Package process :: Module cache :: Class CacheManager
[frames] | no frames]

Class CacheManager

source code

object --+
         |
        CacheManager

A manager for a collection of caches, each for different types of objects and with potentially-overlapping key spaces.

There is generally only one instance of this class, available at master.caches.

Instance Methods
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
get_cache(self, cache_name, miss_fn)
Get an AsyncLRUCache object with the given name.
source code
 
load_config(self, new_config) source code
 
get_metrics(self) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  DEFAULT_CACHE_SIZE = 1
Properties

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

get_cache(self, cache_name, miss_fn)

source code 

Get an AsyncLRUCache object with the given name. If such an object does not exist, it will be created. Since the cache is permanent, this method can be called only once, e.g., in startService, and it value stored indefinitely.

Parameters:
  • cache_name - name of the cache (usually the name of the type of object it stores)
  • miss_fn - miss function for the cache; see AsyncLRUCache constructor.
Returns:
AsyncLRUCache instance