code: def expire(self, time=None):
          
          if time is None:
              time = self.__timer()
          root = self.__root
          curr = root.next
          links = self.__links
          cache_delitem = Cache.__delitem__
          while curr is not root and curr.expire < time:
              cache_delitem(self, curr.key)
              del links[curr.key]
              next = curr.next
              curr.unlink()
              curr = next
docs: Remove expired items from the cache.