'callback is called with the key and value when the item is either replaced or removed from the cache.'

def __init__(self, size=1000, callback=None):

    self.callback = callback
    self.table = {}
    self.head = DoublyLinkedNode()
    self.head.next = self.head
    self.head.prev = self.head
    self._size = 1
    self.size = size
