roave/doctrine-simplecache
最新稳定版本:2.8.0
Composer 安装命令:
composer require roave/doctrine-simplecache
包简介
Doctrine Cache adapter for PSR-16 Simple Cache
README 文档
README
PSR-16 SimpleCache implementation that accepts a Doctrine Cache and adapts it for the PSR-16 standards.
Installation
This will install doctrine/cache if not already installed.
$ composer require roave/doctrine-simplecache
Usage
Create your Doctrine Cache the usual way and inject it into SimpleCacheAdapter, for example:
<?php namespace App; use Psr\Container\ContainerInterface; use Psr\SimpleCache\CacheInterface as PsrCacheInterface; use Roave\DoctrineSimpleCache\SimpleCacheAdapter; use Doctrine\Common\Cache\RedisCache; final class MyCacheFactory { public function __invoke(ContainerInterface $container) : PsrCacheInterface { return new SimpleCacheAdapter(new RedisCache()); } }
Upgrade Guide
BC Breaks in 2.0
- Support for
MultiOperationCacheadded, includes support fordeleteMultiplein Doctrine 1.7 breaks:CacheExceptionstatic constructorsfromNonMultiGetCacheandfromNonMultiPutCachehave been replaced withfromNonMultiOperationCache.SimpleCacheAdapternow requires an adapter implementingMultiOperationCache, and no longer specifically requires a cache implementingMultiGetCacheorMultiPutCacheexplicitly.
统计信息
- 总下载量: 1.33M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 55
- 点击次数: 2
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-04