PSR-6 Doctrine bridge

3.2.0 2022-01-15 15:47 UTC

This package is auto-updated.

Last update: 2024-05-17 13:43:54 UTC


Gitter Latest Stable Version Total Downloads Monthly Downloads Software License

This library provides a PSR-6 compliant bridge between Doctrine and a Cache Pool. The bridge implements the Doctrine\Common\Cache\Cache interface. This is useful for projects that require an implementation of Doctrine\Common\Cache\Cache, but you still want to use a PSR-6 implementation.


composer require cache/psr-6-doctrine-bridge


use Cache\Bridge\Doctrine\DoctrineCacheBridge;

// Assuming $pool is an instance of \Psr\Cache\CacheItemPoolInterface
$cacheProvider = new DoctrineCacheBridge($pool);

$cacheProvider->save($key, $value, $ttl);

// Also, if you need it:
$cacheProvider->getPool(); // same as $pool


Contributions are very welcome! Send a pull request to the main repository or report any issues you find on the issue tracker.