class documentation

class LRUCache(dict): (source)

View In Hierarchy

A dictionary-like object that stores a limited number of items, discarding lesser used items periodically. this is a rewrite of LRUCache from Myghty to use a periodic timestamp-based paradigm so that synchronization is not really needed. the size management is inexact.

Method __getitem__ Undocumented
Method __init__ Undocumented
Method __setitem__ Undocumented
Method setdefault Undocumented
Method values Undocumented
Instance Variable capacity Undocumented
Instance Variable threshold Undocumented
Class _Item Undocumented
Method _manage_size Undocumented
def __getitem__(self, key): (source)

Undocumented

def __init__(self, capacity, threshold=0.5): (source)

Undocumented

def __setitem__(self, key, value): (source)

Undocumented

def setdefault(self, key, value): (source)

Undocumented

def values(self): (source)

Undocumented

capacity = (source)

Undocumented

threshold = (source)

Undocumented

def _manage_size(self): (source)

Undocumented