You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
…-dev)
This PR was merged into the 4.4 branch.
Discussion
----------
[Cache] Psr16Cache does not handle Proxy cache items
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#38006
| License | MIT
Add test for Psr16Cache along with a ProxyAdapter
Commits
-------
e525fa1 [Cache] Psr16Cache does not handle Proxy cache items
Uh oh!
There was an error while loading. Please reload this page.
Symfony version(s) affected: 4.3 and up
Description
First call to a
Psr\Cache\CacheItemPoolInterface
is used by aSymfony\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
The text was updated successfully, but these errors were encountered: