>>> cache = Cache(log_level=logging.WARNING)
        >>> def cache_writer(key): pass
        >>> cache.with_cache_writer(cache_writer)
        False
        >>> def cache_writer(key, value): pass
        >>> cache.with_cache_writer(cache_writer)
        True

def with_cache_writer(self, func, only_read=False):
        """
        >>> cache = Cache(log_level=logging.WARNING)
        >>> def cache_writer(key): pass
        >>> cache.with_cache_writer(cache_writer)
        False
        >>> def cache_writer(key, value): pass
        >>> cache.with_cache_writer(cache_writer)
        True
        """
        self.logger.info('Enabled cache writer %s' % get_function_signature(func))
        self.cache_writer = func
        return True