php实现缓存类代码的方法:【$cache = new Cache(); $values = $cache->get($key); if ($values == false) {$cache->put($key, $values