@_enable_lock<EOL><INDENT>def stop_regularly_cleanup(self, only_read=False):<DEDENT>
if hasattr(self, '<STR_LIT>') and self.cleanup_supervisor is not None:<EOL><INDENT>self.cleanup_supervisor.stop()<EOL>self.logger.debug('<STR_LIT>' % self.cleanup_supervisor.name)<EOL>self.cleanup_supervisor = None<EOL>return True<EOL><DEDENT>else:<EOL><INDENT>self.logger.warning('<STR_LIT>')<EOL>return False<EOL><DEDENT>
>>> cache = Cache(log_level=logging.WARNING)
>>> cache.stop_regularly_cleanup()
True
>>> cache.stop_regularly_cleanup()
False