fivepercent/cache
最新稳定版本:v1.0
Composer 安装命令:
composer require fivepercent/cache
包简介
Cache system
关键字:
README 文档
README
With this package you can cache any data in any storage.
Installation
Add FivePercent/Cache in your composer.json:
{
"require": {
"fivepercent/cache": "~1.0"
}
}
Now tell composer to download the library by running the command:
$ php composer.phar update fivepercent/cache
Basic usage
Available storage:
- ArrayCache
- Cache data in internal array. Will be destroyed after ended script.
- RedisCache
- Cache data in Redis storage. Store data in HASH type.
- ChainCache
- NullCache
Examples:
use FivePercent\Component\Cache\ArrayCache; $cache = new ArrayCache(); if (!$cache->has('my_key')) { $cache->set('my_key', 'My Value'); } print $cache->get('my_key'); // Printing "My Value"
Symfony2
If you use Symfony2 Framework, you can use CacheClearer for clear cache.
Symfony2 ExpressionLanguage
If you use ExpressionLanguage (Symfony Component), you can use ParserCache for store ExpressionLanguage expression.
统计信息
- 总下载量: 1.88k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 7
- 推荐数: 2
其他信息
- 授权协议: MIT
- 更新时间: 2015-06-04