thecodingmachine / psr-6-doctrine-bridge-universal-module
跨框架缓存/psr-6-doctrine-bridge 模块
v1.0.0
2017-09-22 12:46 UTC
Requires
- php: >=7.0
- cache/psr-6-doctrine-bridge: ^2.1
- container-interop/service-provider: ~0.3.0
- thecodingmachine/common-factories: ^0.3
Requires (Dev)
- mnapoli/simplex: ~0.2.0
- phpunit/phpunit: ^5.0
- puli/cli: ^1.0
- puli/composer-plugin: ^1.0
- satooshi/php-coveralls: ^1.0
- thecodingmachine/stash-universal-module: ^1.0
Suggests
- thecodingmachine/stash-universal-module: A service provider providing a PSR-6 cache pool through the Stash library
README
PSR6到Doctrine缓存通用模块
此包将cache/psr-6-doctrine-bridge( Doctrine 缓存与 PSR-6 之间的桥梁)集成到任何兼容container-interop/service-provider的框架/容器中。
安装
composer require thecodingmachine/psr-6-doctrine-bridge-universal-module
安装完成后,您需要将TheCodingMachine\DoctrineCacheBridgeServiceProvider
注册到您的容器中。
如果您的容器支持 thecodingmachine/discovery
集成,则无需执行任何操作。否则,请参考您的框架或容器的文档以了解如何注册 服务提供者。
介绍
此服务提供者将基于已配置的 PSR-6 缓存提供默认的 Doctrine 缓存实现。
它假定已经存在一个提供 PSR-6 缓存池的服务。您可以使用以下方式安装提供此服务的服务提供者
composer require thecodingmachine/stash-universal-module
(这将安装 Stash 及其相关服务提供者。Stash 是一个 PSR-6 缓存库)
用法
use Doctrine\Common\Cache\CacheProvider; $cachePool = $container->get(CacheProvider::class); echo $cachePool->get('my_cached_value');
预期值/服务
此 服务提供者 预期以下配置/服务可用
提供的服务
此 服务提供者 提供以下服务
扩展服务
此 服务提供者 不扩展任何服务。