phpe/ccache
最新稳定版本:v1.0
Composer 安装命令:
composer require phpe/ccache
包简介
Class for caching content
关键字:
README 文档
README
About
A very light and simple class that caches content.
PHP 5 >= 5.3.0
Introduction
Create an object of CCache like $cache = new \phpe\cache\CCache($aPath);
Then you can create a cache file with $cache->Put('nameOfFile', 'contentInFile');
When you want to get the content of a cache file, call $cache->Get('nameOfFile');
You can also prune an item with $cache->Prune('nameOfFile'); or prune all items with $cache->PruneAll('nameOfFile');
Using anax-mvc
Make it apart of $Di like:
$di->setShared('cache', function() { $cache = new \phpe\cache\CCache('path to dir'); return $cache; });
Then can you, depenending where in the code you want to reach CLog, reach the class whit either $app or $di; $app->cache->Put('file', 'hello'); or $this->di->cache->Put('file', 'hello');
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-02-16