philippwitzmann/cache
Composer 安装命令:
composer require philippwitzmann/cache
包简介
Cache Framework
README 文档
README
This library aims to provide basic functionality to work with (testable, interchangable) Cache implementations
Installation
composer require philippwitzmann/cache
Usage
Create an instance
$dateTimeHandler = new DateTimeHandler(); $arrayCache = new ArrayCache($dateTimeHandler);
Set Values
$client = new Client([ 'scheme' => 'tcp', 'host' => '127.0.0.1', 'port' => 6379, ]); $dateTimeHandler = new DateTimeHandler(); $arrayCache = new ArrayCache($dateTimeHandler); $redisCache = new RedisCache($dateTimeHandler, $client); $arrayCache->set('key', 'value', 600); // 600 is Lifetime In Seconds so 10Minutes. $redisCache->set('key', 'value', 600); // 600 is Lifetime In Seconds so 10Minutes. echo $arrayCache->get('key'); // Outputs: 'value'
Running tests
php vendor/bin/phpunit --configuration config/phpunit.xml
统计信息
- 总下载量: 307
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2019-12-31