class documentation

class LRUCache(dict):

View In Hierarchy

Dictionary with 'squishy' removal of least recently used items.

Note that either get() or [] should be used here, but generally its not safe to do an "in" check first as the dictionary can change subsequent to that call.

Method __getitem__ Undocumented
Method __init__ Undocumented
Method __setitem__ Undocumented
Method ​_inc​_counter Undocumented
Method ​_manage​_size Undocumented
Method get Undocumented
Method setdefault Undocumented
Method values Undocumented
Class Variable __slots__ Undocumented
Instance Variable ​_counter Undocumented
Instance Variable ​_mutex Undocumented
Instance Variable capacity Undocumented
Instance Variable size​_alert Undocumented
Instance Variable threshold Undocumented
Property size​_threshold Undocumented
def __getitem__(self, key):

Undocumented

def __init__(self, capacity=100, threshold=0.5, size_alert=None):

Undocumented

def __setitem__(self, key, value):

Undocumented

def _inc_counter(self):

Undocumented

def _manage_size(self):

Undocumented

def get(self, key, default=None):

Undocumented

def setdefault(self, key, value):

Undocumented

def values(self):

Undocumented

__slots__: tuple[str, ...] =

Undocumented

_counter: int =

Undocumented

_mutex =

Undocumented

capacity =

Undocumented

size_alert =

Undocumented

threshold =

Undocumented

@property
size_threshold =

Undocumented