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

Class LRUCache

source code

A simple least-recently-used cache, with a fixed maximum size. Note that an item's memory will not necessarily be free if other code maintains a reference to it, but this class will "lose track" of it all the same. Without caution, this can lead to duplicate items in memory simultaneously.

Instance Methods
 
__init__(self, max_size=50) source code
 
get(*args, **kw)
 
__getitem__(self, id) source code
 
add(*args, **kw)
 
__setitem__(self, id, thing) source code
 
__hook_orig_buildbot_util_LRUCache_add__(self, id, thing) source code
 
__hook_orig_buildbot_util_LRUCache_get__(self, id) source code
Class Variables
  synchronized = ['get', 'add']
  __hook_post_buildbot_util_LRUCache_add__ = [<function _synchPo...
  __hook_post_buildbot_util_LRUCache_get__ = [<function _synchPo...
  __hook_pre_buildbot_util_LRUCache_add__ = [<function _synchPre...
  __hook_pre_buildbot_util_LRUCache_get__ = [<function _synchPre...
Class Variable Details

__hook_post_buildbot_util_LRUCache_add__

Value:
[<function _synchPost at 0xa2db18>]

__hook_post_buildbot_util_LRUCache_get__

Value:
[<function _synchPost at 0xa2db18>]

__hook_pre_buildbot_util_LRUCache_add__

Value:
[<function _synchPre at 0xa2daa0>]

__hook_pre_buildbot_util_LRUCache_get__

Value:
[<function _synchPre at 0xa2daa0>]