'Add a new value to the cache.
Also, if the entry is ever removed from the cache, call
cleanup(key, value).
:param key: The key to store it under
:param value: The object to store
:param cleanup: None or a function taking (key, value) to indicate
\'value\' should be cleaned up.'

def add(self, key, value, cleanup=None):

    if (key is _null_key):
        raise ValueError('cannot    use    _null_key    as    a    key')
    node = self._cache.get(key, None)
    value_len = self._compute_size(value)
    if (value_len >= self._after_cleanup_size):
        if (node is not None):
            self._remove_node(node)
        if (cleanup is not None):
            cleanup(key, value)
        return
    if (node is None):
        node = _LRUNode(key, value, cleanup=cleanup)
        self._cache[key] = node
    else:
        self._value_size -= node.size
    node.size = value_len
    self._value_size += value_len
    self._record_access(node)
    if (self._value_size > self._max_size):
        self.cleanup()
