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

Class LRUCache

source code

object --+
         |
        LRUCache
Known Subclasses:

A least-recently-used cache, with a fixed maximum size.

See buildbot manual for more information.

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

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

Class Variables
  sentinel = object()
  QUEUE_SIZE_FACTOR = 10
Properties
  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)