此包已被废弃,不再维护。作者建议使用 cache/cache 包。

快速缓存库。支持多种驱动程序。[已废弃]

v2.0.1 2017-01-12 10:10 UTC

This package is auto-updated.

Last update: 2022-02-01 12:34:40 UTC


README

此包已废弃,请使用PSR-6解决方案,例如 https://github.com/php-cache/cache

缓存

快速缓存库。支持多种驱动程序。

Latest Version on Packagist Software License Build Status Coverage Status Quality Score

安装

composer require treehouselabs/cache:^2.0

用法

$driver = new RedisDriver($redis);
$serializer = new JsonSerializer();
$cache = new Cache($driver, $serializer);

$cache->set('foo', 'bar', 60);
$cache->get('foo');
$cache->has('foo');
$cache->remove('foo');