- Issue created by @Fabianx
- ๐ฎ๐ณIndia deborahblessy
Hi @Fabianx,
I have created and attached the patch. Could you please verify this?
- Status changed to Needs review
over 1 year ago 1:22pm 19 October 2023 - last update
over 1 year ago 30,417 pass - ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
Thank you, @deborahblessy!
Next step: test coverage.
- Status changed to Needs work
over 1 year ago 8:25pm 19 October 2023 - Assigned to Fabianx
- Status changed to Needs review
4 months ago 10:14pm 21 September 2024 - ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
Catching up on long-forgotten tabs โฆ from last yearโs European DrupalCon just before this yearโs starts ๐
I think Fabian is best suited to determine what is next here.
- ๐บ๐ธUnited States smustgrave
Brought this up in #contribute in slack https://drupal.slack.com/archives/C1BMUQ9U6/p1727876410850979
@fabianx agreed on the approach but mentioned still needs tests.
- First commit to issue fork.
- ๐บ๐ธUnited States nicxvan
Moved to MR so tests can run and be more easily written.
- First commit to issue fork.
- ๐ง๐ทBrazil murilohp
Hey, just created a new test to validate the proposed solution, moving this to NR and removing the tag for now, thanks!
- ๐บ๐ธUnited States smustgrave
1) Drupal\Tests\Core\Cache\ChainedFastBackendTest::testSetInvalidDataFastBackend Invalid data was not saved on the fast cache. stdClass Object (...) does not match expected type "NULL". /builds/issue/drupal-3395212/core/tests/Drupal/Tests/Core/Cache/ChainedFastBackendTest.php:103 FAILURES! Tests: 3, Assertions: 7, Failures: 1. Exiting with EXIT_CODE=1
Shows test coverage.
Not sure if this needs any kind of release note (assuming not)
Looking at the change to core/lib/Drupal/Core/Cache/ChainedFastBackend.php and don't see anything glaringly wrong. Think adding the condition makes sense.
believe this one is good.
- Issue was unassigned.
- Status changed to RTBC
about 1 month ago 1:34pm 12 December 2024 - ๐ง๐ชBelgium kristiaanvandeneynde Antwerp, Belgium
Gave the IS some thought and at first felt like this was wrong:
See that fastBackend is happily setting invalid data, which will never be useful
After all, if you're getting the data while note caring about its validity, you may as well store that in memory for future gets which do not care about validity. However, then I realized that a cache get which allows invalid could the poison the memory cache for a subsequent cache get which does not allow invalid. And that would be really bad.
I still have the eerie feeling that there are edge cases we're not seeing here, but for now I'd say it makes more sense to commit this change rather than keep the old behavior.
So RTBC +1.
- ๐ฌ๐งUnited Kingdom catch
I think this is worth skipping just from a cache efficiency point of view if nothing else - allow_invalid is most likely to be used in the case that stale content is served and then a cache refresh job is queued (or done end of request or similar), so there'll be a new cache write pretty fast after this gets set anyway. Cache poisoning seems theoretical because the fast backend should handle invalid items correctly, but it doesn't hurt.
Committed/pushed to 11.x/11.1.x/10.5.x/10.4.x, thanks!
Automatically closed - issue fixed for 2 weeks with no activity.