code: def put(self, key, value, expire=None, timeout=1, is_async=True, only_read=False):
          
          if key in self.cache_items:
              self.cache_items.pop(key)
          if expire is None:
              expire = self.expire
          self.cache_items[key] = CacheItem(key=key, value=value, expire=expire)
docs: Test:
  
          >>> cache = Cache(expire=2)
          >>> cache.put('a', 0)
          >>> cache.get('a')
          0
          >>> cache.put('a', 1)
          >>> cache.get('a')
          1