code: def replace_cleanup_func(self, func, only_read=False):
          
          self.logger.info('Replace the cleanup function %s ---> %s' % (
              get_function_signature(self.cleanup), get_function_signature(func)))
          self.cleanup = func
          return True
docs: >>> cache = Cache(log_level=logging.WARNING)
          >>> def cleanup(self): pass
          >>> cache.replace_cleanup_func(cleanup)
          True
          >>> def cleanup_b(self, other): pass
          >>> cache.replace_cleanup_func(cleanup_b)
          False