def set(self, key, value):
        """Store an item in the cache

        - if already there, moves to the most recent
        - if full, delete the oldest item
        """
        self[key] = value
        self._ages[key] = self._now()
        self.move_to_end(key)
        if len(self) > self.max_size:
            first_key = next(iter(self))
            self.pop(first_key)
Store an item in the cache

        - if already there, moves to the most recent
        - if full, delete the oldest item
        
binderhub/utils.py