This package adapts a PSR-6 cache pool to the legacy Doctrine\Common\Cache\Cache API.
composer require cache/psr-6-doctrine-bridge:^4.0use Cache\Bridge\Doctrine\DoctrineCacheBridge;
$cacheProvider = new DoctrineCacheBridge($pool);
$cacheProvider->contains($key);
$cacheProvider->fetch($key);
$cacheProvider->save($key, $value, $ttl);
$cacheProvider->delete($key);
$cacheProvider->getCachePool();$pool must implement Psr\Cache\CacheItemPoolInterface from psr/cache 3.x.
The bridge keeps legacy normalized keys when the pool accepts them. If the pool rejects a key, the bridge retries with a 64-character SHA-256 key.
Send pull requests to the main repository. Report issues on the GitHub issue tracker.