emmetog/cache
Composer 安装命令:
composer require emmetog/cache
包简介
A collection of PHP classes which act as caches
README 文档
README
A collection of PHP classes which act as caches. This package has an interface and several classes which implement it. At the moment there are classes for the following types of cache:
- Memcached (requires the php5-memcached package to be installed on your system)
- Registry (uses static variables to cache things for one PHP execution only)
- NullCache (can be used anywhere any other cache can but doesn't actually cache anything)
This package has no other dependancies, it can easily be used on it's own.
Installation
This package uses Composer, to use it just add it to your composer.json file.
For example:
"require": {
"emmetog/cache": "1.0.*",
}
Then just create the object you want (careful with namespaces) and use it, for example:
$registry = Emmetog\Cache\Registry::getInstance();
$registry->set('hello', 'world');
// $cachedValue will contain the string "world".
$cachedValue = $registry->get('hello');
This package follows the semantic versioning guidelines.
统计信息
- 总下载量: 75
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2013-07-15