@classmethod
def fromcache(cls, cache, iterable=()):
    """Initialize deque using `cache`.

        >>> cache = Cache('/tmp/diskcache/index')
        >>> _ = cache.clear()
        >>> deque = Deque.fromcache(cache, [5, 6, 7, 8])
        >>> len(deque)
        4
        >>> 7 in deque
        True
        >>> deque.popleft()
        5

        :param Cache cache: cache to use
        :param iterable: iterable of items
        :return: initialized Deque

        """
    self = cls.__new__(cls)
    self._cache = cache
    self.extend(iterable)
    return self
