@_check_function_obj(param_length=<NUM_LIT:2>)<EOL><INDENT>@_enable_lock<EOL>def with_cache_writer(self, func, only_read=False):<DEDENT>
self.logger.info('<STR_LIT>' % get_function_signature(func))<EOL>self.cache_writer = func<EOL>return True<EOL>
>>> 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