PSR-16 SimpleCache implementation that accepts a Doctrine Cache and adapts it for the PSR-16 standards.
This will install doctrine/cache if not already installed.
$ composer require roave/doctrine-simplecacheCreate your Doctrine Cache the usual way and inject it into SimpleCacheAdapter, for example:
<?phpnamespaceApp;
usePsr\Container\ContainerInterface;
usePsr\SimpleCache\CacheInterfaceasPsrCacheInterface;
useRoave\DoctrineSimpleCache\SimpleCacheAdapter;
useDoctrine\Common\Cache\RedisCache;
finalclass MyCacheFactory
{
publicfunction__invoke(ContainerInterface$container) : PsrCacheInterface
{
returnnewSimpleCacheAdapter(newRedisCache());
}
}- Support for
MultiOperationCacheadded, includes support fordeleteMultiplein Doctrine 1.7 breaks:CacheExceptionstatic constructorsfromNonMultiGetCacheandfromNonMultiPutCachehave been replaced withfromNonMultiOperationCache.SimpleCacheAdapternow requires an adapter implementingMultiOperationCache, and no longer specifically requires a cache implementingMultiGetCacheorMultiPutCacheexplicitly.

