maximebf/cachecache
最新稳定版本:1.0.2
Composer 安装命令:
composer require maximebf/cachecache
包简介
Caching library for PHP5.3
关键字:
README 文档
README
Caching framework for PHP 5.3+
Features:
- Easy retreival and storing of key, value pairs using the many available methods
- Cache function calls
- Available object wrapper to cache calls to methods
- Pipelines ala Predis (see below)
- Namespaces
- TTL variations to avoid all caches to expire at the same time
- Multiple backends support (apc, file, memcache(d), memory, redis, session)
- Monolog support
- Very well documented
CacheCache features are exposed through a Cache object which itself uses backends to store the data. Multiple instances of Cache objects can be managed using the CacheManager.
Full documentation at http://maximebf.github.com/CacheCache/
Examples:
$cache = new CacheCache\Cache(new CacheCache\Backends\Memory());
if (($foo = $cache->get('foo')) === null) {
$foo = 'bar';
$cache->set('foo', $foo);
}
if (!$cache->start('foo')) {
echo "bar\n";
$cache->end();
}
$cache->call('sleep', array(2));
$cache->call('sleep', array(2)); // won't sleep!
$r = $cache->pipeline(function($pipe) {
$pipe->set('foo', 'bar');
$pipe->set('bar', 'foo');
$pipe->get('foo');
$pipe->set('foo', 'foobar');
$pipe->get('foo');
});
More examples in examples/
统计信息
- 总下载量: 143.39k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 51
- 点击次数: 1
- 依赖项目数: 4
- 推荐数: 2
其他信息
- 授权协议: MIT
- 更新时间: 2012-08-18