Package buildbot :: Package util :: Module lru :: Class AsyncLRUCache
[frames] | no frames]

Class AsyncLRUCache

source code

object --+    
         |    
  LRUCache --+
             |
            AsyncLRUCache

An LRU cache with asynchronous locking to ensure that in the common case of multiple concurrent requests for the same key, only one fetch is performed.

Instance Methods
 
__init__(self, miss_fn, max_size=50)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
get(self, key, **miss_fn_kwargs) source code

Inherited from LRUCache: inv, keys, put, set_max_size

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

Class Variables

Inherited from LRUCache: QUEUE_SIZE_FACTOR, sentinel

Properties
  concurrent

Inherited from LRUCache: cache, hits, max_queue, max_size, miss_fn, misses, queue, refcount, refhits, weakrefs

Inherited from object: __class__

Method Details

__init__(self, miss_fn, max_size=50)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

get(self, key, **miss_fn_kwargs)

source code 
Overrides: LRUCache.get