Cross-framework module for cache/psr-6-doctrine-bridge
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.
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)
use Doctrine\Common\Cache\CacheProvider; $cachePool = $container->get(CacheProvider::class); echo $cachePool->get('my_cached_value');
This service provider expects the following configuration / services to be available:
||yes||A PSR-6 compatible cache pool.|
This service provider provides the following services:
||A Doctrine cache, this is actually a bridge to the PSR-6 pool.|
||An alias to the
This service provider does not extend any service.