battis/simplecache
最新稳定版本:v1.2.2
Composer 安装命令:
composer require battis/simplecache
包简介
Manage a simple cache backed by a MySQL database
README 文档
README
Manage a simple cache backed by a MySQL database
Install
In your composer.json add:
"require": { "battis/simplecache": "1.*" }
Use
Create a cache:
$mysqli = new mysqli('localhost', 'bob', 's00pers3kr3t', 'app-db'); // or whatever your credentials are $cache = new \Battis\SimpleCache($mysqli);
Basic workflow using cached data (check the cache and used cached data if there, otherwise build data and cache it for next time):
$data = $cache->getCache('foo'); if ($data === false) { // ... lots and lots of work to create $data from scratch $cache->setCache('foo', $data); // cache for next use }
Full API documentation is available in /docs.
统计信息
- 总下载量: 238
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 7
- 推荐数: 0
其他信息
- 授权协议: LGPL-3.0
- 更新时间: 2015-06-22