thecodingmachine / psr-6-doctrine-bridge-universal-module
Cross-framework module for cache/psr-6-doctrine-bridge
Installs: 108 309
Dependents: 1
Suggesters: 1
Security: 0
Stars: 0
Watchers: 8
Forks: 1
Open Issues: 0
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 to Doctrine cache universal module
This package integrates cache/psr-6-doctrine-bridge (the bridge between Doctrine cache and PSR-6) in any container-interop/service-provider compatible framework/container.
Installation
composer require thecodingmachine/psr-6-doctrine-bridge-universal-module
Once installed, you need to register the TheCodingMachine\DoctrineCacheBridgeServiceProvider
into your container.
If your container supports thecodingmachine/discovery integration, you have nothing to do. Otherwise, refer to your framework or container's documentation to learn how to register service providers.
Introduction
This service provider will provide a default Doctrine cache implementation based on the already configured PSR-6 cache.
It assumes there is already a configured service providing a PSR-6 cache pool. You can install a service provider providing this service using:
composer require thecodingmachine/stash-universal-module
(this will install Stash and its related service-provider. Stash is a PSR-6 caching library)
Usage
use Doctrine\Common\Cache\CacheProvider; $cachePool = $container->get(CacheProvider::class); echo $cachePool->get('my_cached_value');
Expected values / services
This service provider expects the following configuration / services to be available:
Provided services
This service provider provides the following services:
Extended services
This service provider does not extend any service.