use thinkcachedriverRedis; $redis = new Redis(); $comToken= $redis->get('token'); $redis->set(token',123,7000); //7000秒后过期