code: def set_expire(self, new_expire, only_read=False):
          
          if not isinstance(new_expire, int) or new_expire < 0:
              self.logger.warning('Parameter new_expire %s must be positive number' % new_expire)
              return
          self.expire = new_expire
docs: >>> cache = Cache(log_level=logging.WARNING)
          >>> cache.set_expire(40)
          >>> cache.expire
          40
          >>> cache.set_expire('haha')
          >>> cache.expire
          40