next/cache

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

Maintainers

Package info

github.com/next-laboratory/cache

pkg:composer/next/cache

Statistics

Installs: 30

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

0.2.0 2025-05-30 01:49 UTC

This package is auto-updated.

Last update: 2026-03-06 11:13:27 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'));