@_enable_lock<EOL><INDENT>def clear(self, only_read=False):<DEDENT>
self.cache_items.clear()<EOL>self.total_access_count = <NUM_LIT:0><EOL>self.logger.debug('<STR_LIT>')<EOL>
>>> cache = Cache(log_level=logging.WARNING)
>>> cache.put('a', 0)
>>> cache.put('b', 1)
>>> cache.size()
2
>>> cache.clear()
>>> cache.size()
0