next/cache

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

Installs: 29

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/next/cache

0.1.1 2024-01-14 02:58 UTC

This package is auto-updated.

Last update: 2025-10-24 13:22:07 UTC


README

Max

轻量 • 简单 • 快速

起步

符合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'));