'Sets the value for an item. Moves the item up so that it
has the highest priority then.'

def __setitem__(self, key, value):

    self._wlock.acquire()
    try:
        if (key in self._mapping):
            self._remove(key)
        elif (len(self._mapping) == self.capacity):
            del self._mapping[self._popleft()]
        self._append(key)
        self._mapping[key] = value
    finally:
        self._wlock.release()
