self implemented deque for LRU cache