>>> cache = Cache(log_level=logging.WARNING)
        >>> cache.put('a', 0)
        >>> cache.put('b', 1)
        >>> cache.size()
        2
        >>> cache.clear()
        >>> cache.size()
        0

def clear(self, only_read=False):
        """
        >>> cache = Cache(log_level=logging.WARNING)
        >>> cache.put('a', 0)
        >>> cache.put('b', 1)
        >>> cache.size()
        2
        >>> cache.clear()
        >>> cache.size()
        0
        """
        self.cache_items.clear()
        self.total_access_count = 0
        self.logger.debug('Cache clear operation is completed')