- last update
10 months ago 51 pass, 2 fail - 🇦🇹Austria drunken monkey Vienna, Austria
OK, finally got around to working on this, and I can confirm that this problem indeed exists: as soon as you activate a Views cache plugin (tag- or time-based, doesn’t matter) and a user is served a cached view, the “Save search” block disappears.
The problem is that this doesn’t even go through the Views cache plugin’s
cacheGet()
method (which we amended, in the Search API module, to add the search results to the global context) but already produces a hit in the render cache, completely circumventing any of the Views code. See the attached regression test.Now, my problem is that I have no idea at all how this could be fixed. Obviously, it would be bad to just disable render caching for the view whenever the “Save search” block is present on the page – but I don’t even know how we could do that.
The same goes for the (probably) proper solution to execute something like the code in\Drupal\search_api\Plugin\views\cache\SearchApiCachePluginTrait::cacheGet()
(i.e., simulate a search query having been executed) for render cache hits, too. I don’t think it’s possible to hook into render cache hits, and it would sound like a performance nightmare even if it were possible.Does anyone have any ideas here?
I’m in any case increasing the priority to “Major”, but I might need to drop the “Release blocker” tag and just create a stable release even if it does have this pretty large flaw.(Setting to NR so the test bot will test the patch, but it is of course expected to fail.)
The last submitted patch, 11: 3061088-11--views_cache_problems--tests_only.patch, failed testing. View results →
- 🇦🇹Austria drunken monkey Vienna, Austria
Note: 📌 Convert README.txt to Markdown Fixed added a link to this issue to
README.md
, so we should remember to remove this again when we get this issue resolved. - 🇦🇹Austria drunken monkey Vienna, Austria
At this point, unless someone suggests a viable solution very soon I’m pretty sure I’m gonna create a stable release even without resolving this first.