<?php class Cache { private $dir; private $lifetime; private $cacheid; private $ext; function __construct($dir='',$lifetime=1800) { if ($this->dir_isvalid($dir)) { $this->dir = $dir; $this->lifetime = $lifetime; $this->ext = '.Php'; $this->cacheid = $this->getcacheid(); } } private function isvalid() { if (!file_exists($this->cacheid)) return false; if (!(@$mtime = filemtime($this->cacheid))) return false; if (mktime() - $mtime > $this->lifetime) return false; return true; }
这是一个PHP实现的缓存类库,需要的朋友可以下载使用
申明:本站所有资源都是转载各大下载站,或由网友投稿发布,请自行检测软件的完整性,如有侵权请联系我们删除下架,联系方式:admin@php.cn