-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
Description
Symfony version(s) affected: 4.3 and up
Description
First call to a Psr\Cache\CacheItemPoolInterface
is used by a Symfony\Component\Cache\Psr16Cache
to generate a prototype. Not every prototype will work in current implementation. Consuming a ProxyAdapter keeps the inner item intact, which means every subsequent call will use the inner item given by the first call.
How to reproduce
$cache = new SymfonyCache();
$cache = new Psr16Cache(new ProxyAdapter($cache, 'my-namespace.'));
$cache->get('some-key'); // The prototype contains 'poolHash' and 'innerItem' set to SymfonyCache instance.
$cache->set('some-other-key', 'value'); // SymfonyCache receive a call to set some-key.
$cache->set('some-third-key', 'value'); // SymfonyCache receive a call to set some-key.