承接 honklegion/psr16storage 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

honklegion/psr16storage

最新稳定版本:v1.0.0

Composer 安装命令:

composer require honklegion/psr16storage

包简介

Nette PSR16 storage adapter

README 文档

README

CI Coverage Status Latest Stable Version Total Downloads License

Nette cache Storage adapter backed by a PSR-16 cache implementation.

Installation

composer require honklegion/psr16storage

Requirements

  • PHP >=8.2 <8.6
  • nette/caching ^3.2
  • psr/simple-cache ^1.0|^3.0

Usage

Use any PSR-16 cache and wrap it with Psr16Storage.

<?php

declare(strict_types=1);

use HonkLegion\Psr16Storage\Psr16Storage;
use Nette\Caching\Cache;

/** @var \Psr\SimpleCache\CacheInterface $psr16 */
$storage = new Psr16Storage($psr16);
$cache = new Cache($storage);

$cache->save('key', 'value', [
    Cache::Expire => time() + 300,
]);

$value = $cache->load('key');

Optional max TTL forwarded to PSR-16 backend:

$storage = new Psr16Storage($psr16, 3600); // max 1 hour

Notes and Limitations

  • Cache::Items dependency is not supported and throws Nette\NotSupportedException.
  • Cache::Tags and Cache::Priority are not supported and throw Nette\InvalidStateException.
  • Callback dependencies are supported and invalid entries are removed.
  • Sliding expiration is supported.

Development

composer test
composer phpcs
composer phpstan

CI runs on PHP 8.2, 8.3, 8.4, and 8.5.

统计信息

  • 总下载量: 11
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固