@_enable_thread_pool<EOL><INDENT>@_enable_lock<EOL>@_enable_cleanup<EOL>def put(self, key, value, expire=None, timeout=<NUM_LIT:1>, is_async=True, only_read=False):<DEDENT>
if key in self.cache_items:<EOL><INDENT>self.cache_items.pop(key)<EOL><DEDENT>if expire is None:<EOL><INDENT>expire = self.expire<EOL><DEDENT>self.cache_items[key] = CacheItem(key=key, value=value, expire=expire)<EOL>
Test:

>>> cache = Cache(expire=2)
>>> cache.put('a', 0)
>>> cache.get('a')
0
>>> cache.put('a', 1)
>>> cache.get('a')
1