anoxgh/simplecache
Composer 安装命令:
composer require anoxgh/simplecache
包简介
simple cache classes
README 文档
README
Install
Install via composer:
{ "require": { "anoxgh/simplecache": "dev-master" } }
Run composer install then use as normal:
Usage
$fileCache = new AnoxGH\SimpleCache\FileCache('Temporary/FileCache'); $fileCache->set('CacheKey', 'ExampleValue', 360); var_dump($fileCache->get('CacheKey')); $fileCache->flush('CacheKey'); $sessionCache = new AnoxGH\SimpleCache\SessionCache(); $sessionCache->set('CacheKey', 'ExampleValue', 360); var_dump($sessionCache->get('CacheKey')); $sessionCache->flush('CacheKey'); $apcCache = new AnoxGH\SimpleCache\ApcCache(); $apcCache->set('CacheKey', 'ExampleValue', 360); var_dump($apcCache->get('CacheKey')); $apcCache->flush('CacheKey'); $memoryCache = new AnoxGH\SimpleCache\MemoryCache(); $memoryCache->set('CacheKey', 'ExampleValue', 360); var_dump($memoryCache->get('CacheKey')); $memoryCache->flush('CacheKey'); $memCacheServer = array( array('127.0.0.1', 7000, 10), array('127.0.0.2', 7000, 20)); $memCache = new AnoxGH\SimpleCache\MemCache($memCacheServer); $memCache->set('CacheKey', 'ExampleValue', 360); var_dump($memCache->get('CacheKey')); $memCache->flush('CacheKey');
Credits
PHP SimpleCache was created by Sebastian Gieselmann. Released under the GPL-2.0 license.
统计信息
- 总下载量: 9
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2015-05-30