max/cache

This package is abandoned and no longer maintained. The author suggests using the next/cache package instead.

A cache component based on PSR16 specification which supports File,Redis,Memcached and APC.

0.1 2023-10-31 02:27 UTC

This package is auto-updated.

Last update: 2023-10-31 02:50:38 UTC


README

Max

轻量 • 简单 • 快速

68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e302d627269676874677265656e 68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d617061636865253230322d626c7565

起步

符合Psr16的缓存组件,支持File,Memcached,Redis,Apcu驱动。协程环境下需要自定义驱动

安装

composer require next/cache

使用

<?php

use Next\Cache\Cache;

$cache = new \Next\Cache\Cache(new \Next\Cache\Driver\FileDriver('./runtime/cache'))
//设置缓存
$cache->set('stat', 12, 10);
//读取缓存
var_dump($cache->get('stat'));