@_enable_lock<EOL><INDENT>def size(self, only_read=True):<DEDENT>
return len(self.cache_items)<EOL>
>>> cache = Cache(log_level=logging.WARNING)
>>> cache.put('a', 0)
>>> cache.put('b', 1)
>>> cache.put('c', 2)
>>> cache.size()
3
>>> cache.pop('c')
2
>>> cache.size()
2