gember/cache-psr
最新稳定版本:0.2.0
Composer 安装命令:
composer require gember/cache-psr
包简介
Gember Event Sourcing Cache adapter based on psr/simple-cache (PSR-16)
关键字:
README 文档
README
Gember Event Sourcing Cache adapter based on psr/simple-cache (PSR-16).
All external dependencies in Gember Event Sourcing are organized into separate packages, making it easy to swap out a vendor adapter for another.
Installation
Install with Composer:
composer require gember/cache-psr
Configuration
Bind this adapter to the Cache interface in your service definitions.
Examples
Vanilla PHP
use Gember\CachePsr\PsrSimpleCache; $cache = new PsrSimpleCache( new SomeSimpleCacheAdapter(), // An implementation of Psr\SimpleCache\CacheInterface of your choice );
You will need to install a PSR-16 Cache implementation as well. Some available packages:
Symfony
It is recommended to use the Symfony bundle to configure Gember Event Sourcing. With this bundle, the adapter is automatically set as the default for Cache.
If you're not using the bundle, you can bind it directly to the Cache interface.
Gember\EventSourcing\Util\Cache\Cache: class: Gember\CachePsr\PsrSimpleCache\PsrSimpleCache arguments: - '@cache.app' # or any other Symfony Cache definition of your choice
统计信息
- 总下载量: 167
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-10-07