rodrigoalviani/php-simple-cache
最新稳定版本:v0.1.0
Composer 安装命令:
composer require rodrigoalviani/php-simple-cache
包简介
PHP class to cache dynamic pages in file and reduce Database overload.
关键字:
README 文档
README
PHP class to cache dynamic pages in file and reduce Database overload
Install
Install via composer:
{ "require": { "rodrigoalviani/php-simple-cache": "~0.1" } }
Run composer install then use as normal:
require 'vendor/autoload.php'; $cache = new Rodrigoalviani\Cache\Cache($label);
Usage
A very basic usage example:
$cache = new Rodrigoalviani\Cache\Cache($_SERVER['REQUEST_URI']); $cache->cacheInit(); // your page here $cache->cacheEnd();
A more advanced example:
$cache = new Rodrigoalviani\Cache\Cache($_SERVER['REQUEST_URI']); $cache->set_filePath('tmp/'); $cache->set_cacheMaxAge(84600); $cache->set_cacheExtension('.tmp'); $cache->cacheInit(); // your page here $cache->cacheEnd();
Credits
PHP Simple Cache was created by Rodrigo Alviani. Released under the MIT license.
统计信息
- 总下载量: 17
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-12-22