- Issue created by @willempje2
- Status changed to Needs review
9 months ago 6:17pm 3 August 2024 - Status changed to Needs work
9 months ago 12:28am 4 August 2024 - πΊπΈUnited States smustgrave
As a bug can we get a failing test showing this issue
Thanks.
- π³π±Netherlands willempje2
Writing a test for this can get complicated quickly (at least for me). I gave it a good try, but I could not find a way to dynamically define a new plugin definition that could simulate a new deployment while triggering the cache on simulated "old" code without this plugin.
Regarding the bug itself:
It may be more likely to appear when a new plugin definition is written in an already enabled module. The ModuleInstaller.php does invoke plugin.cache_clearer > clearCachedDefinitions, making the window where old cache discovery can be triggered much smaller. - π³π±Netherlands willempje2
As advised by berdir in: https://drupal.slack.com/archives/C1BMUQ9U6/p1728027442436809?thread_ts=...
For sites using Redis this can easily be solved by setting your global cache prefix to your release hash ( or deployment key etc )