def __init__(self, c, **kwargs): # c is cache size self.c = c self.cn = 0 self.head = None self.tail = None self.stored = {} self.hitcount = 0 self.count = 0 self.stats = statbase()
def __init__(self, c, **kwargs): # c is cache size self.c = c # Max self.cn = 0 # Current self.hand = 0 self.cache = [] # keys self.stored = {} # key => entry self.hitcount = 0 self.count = 0 self.stats = statbase()
def __init__(self, c, **kwargs): random.seed(1337) # c is cache size self.c = c self.cn = 0 self.cache = [] self.stored = {} # key => item self.hitcount = 0 self.count = 0 self.stats = statbase()
def __init__(self, c): random.seed(1337) # c is cache size self.c = c self.k = 3 self.cn = 0 self.cache = [] # (key) self.stored = {} # key => entry self.hitcount = 0 self.count = 0 self.stats = statbase()
def __init__(self, c, **kwargs): self.c = c # Cache size self.cn = 0 # Items in cache now self.cached = {} # Cached keys self.hitcount = 0 self.count = 0 self.p = 0 self.t1 = Deque() self.t2 = Deque() self.b1 = Deque() self.b2 = Deque() self.stats = statbase()