def replace_evict_func(self, func, only_read=False):
        """
        >>> cache = Cache(log_level=logging.WARNING)
        >>> def evict(dict, evict_number=10): pass
        >>> cache.replace_evict_func(evict)
        True
        >>> def evict_b(dict): pass
        >>> cache.replace_evict_func(evict_b)
        False
        >>> def evict_c(dict, a, b): pass
        >>> cache.replace_evict_func(evict_c)
        False
        """
        self.logger.info('Replace the evict function %s ---> %s' % (
            get_function_signature(self.evict_func), get_function_signature(func)))
        self.evict_func = func
        return True
def replace_evict_func ( self , func , only_read = False ) : self . logger . info ( 'Replace the evict function %s ---> %s' % ( get_function_signature ( self . evict_func ) , get_function_signature ( func ) ) ) self . evict_func = func return True
>>> cache = Cache(log_level=logging.WARNING)
        >>> def evict(dict, evict_number=10): pass
        >>> cache.replace_evict_func(evict)
        True
        >>> def evict_b(dict): pass
        >>> cache.replace_evict_func(evict_b)
        False
        >>> def evict_c(dict, a, b): pass
        >>> cache.replace_evict_func(evict_c)
        False