def __setitem__(self, key, value):
        assert key not in self._cache, (
            "Unexpected attempt to replace a cached item,"
            " without first deleting the old item.")
        self._lru.append(key)
        while len(self._lru) > self._capacity:
            del self[self._lru[0]]
        self._cache[key] = value
dataset/ETHPy150Open borgbackup/borg/borg/lrucache.py/LRUCache.__setitem__/original