@_enable_lock<EOL><INDENT>def set_expire(self, new_expire, only_read=False):<DEDENT>
if not isinstance(new_expire, int) or new_expire < <NUM_LIT:0>:<EOL><INDENT>self.logger.warning('<STR_LIT>' % new_expire)<EOL>return<EOL><DEDENT>self.expire = new_expire<EOL>
>>> cache = Cache(log_level=logging.WARNING)
>>> cache.set_expire(40)
>>> cache.expire
40
>>> cache.set_expire('haha')
>>> cache.expire
40