o2system/cache

PHP 缓存处理库

安装次数: 1,686

依赖项: 2

建议者: 0

安全性: 0

星星: 0

关注者: 3

分支: 0

开放性问题: 0

类型:package

v2.2.107 2020-06-02 22:49 UTC

This package is auto-updated.

Last update: 2024-09-25 22:59:06 UTC


README

alt text

Scrutinizer Code Quality Build Status PHP Composer Latest Stable Version Total Downloads License

O2System Cache

O2System Cache 是一个开源的缓存管理适配器库。它允许 O2System 框架集成一些最受欢迎的缓存存储引擎。除了基于文件的缓存外,所有缓存都需要特定的服务器要求,如果服务器要求未满足,将抛出致命异常。O2System Cache 为在 O2System 框架中更强大的工作而构建,但也可以作为具有有限功能的独立版本与其他系统集成。

O2System Cache 基于PSR-6:缓存接口和PSR-16:缓存库通用接口编写。

支持的存储引擎适配器

APC 和 XCache 已被弃用,OPCache 已合并到 APCu 中。

Composer 安装

安装 O2System Cache 的最佳方式是使用 Composer

composer require o2system/cache

Packagist: https://packagist.org.cn/packages/o2system/cache

用法

use O2System\Cache;

$cache = new Cache\Adapters\Opcache\ItemPool();

if( $cache->isConnected() ) {
    // Save cache
    $cache->save( new Cache\Item( 'cacheKeyName', 'This is cache content, support any type of data', 300 ) );
    // Get cache
    echo $cache->getItem( 'cacheKeyName' )->get();
}

输出:这是缓存内容,支持任何类型的数据

文档可在本存储库的 wiki 或访问本存储库的 GitHub 页面 上找到。

意见和建议

请通过 contact@o2system.id 联系我们

错误和问题

请通过 Github 提交您的问题,以便我们可以在开发过程中跟踪所有问题并向此存储库发送 pull request

系统要求