

def set(self, key, value):
    try:
        self.cache.pop(key)
    except KeyError:
        if (len(self.cache) >= self.capacity):
            self.cache.popitem(last=False)
    self.cache[key] = value

dataset/ETHPy150Open jasonlvhit/lunar/lunar/util.py LRUCache.set/original