Problem/Motivation
While investigating #3436146: Introduce a list of "frequent cache tags" to reduce lookup query amount I was reminded about the problem with last write timestamp, which currently also causes a separate cache tag lookup for the cache bin because of our implementation of invalidate/delete on the whole bin.
We can likely identify those specific cache reads and handle them differently, essentially as a standalone lookup and not a full cache get. Possibly even a bulk load for common ones as suggested by that core issue.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork redis-3498940
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
berdirI think there's actually one more lookup for each last write timestamp, the cache tag IIRC is for invalidateAll() which is almost never used, and there is a separate delete flag that's not a tag.
Comment #3
berdirCross-reference: #3498947: Deprecate CacheBackendInterface::invalidateAll().
Comment #5
berdirCreated a merge requests, seems to be working pretty well.
Comment #6
berdirTested this a bit more, have to clean the returned cache tags so they aren't picked up by the fast chained backend:
Impact of this as a diff of the MONITOR output:
This saves 3x2 GET commands for the config, discovery and bootstrap cache bins during bootstrap roughly up until dynamic page cache.
Complete output after with this:
There are still 2 cache tag lookups for the bin-tag that powers invalidateAll(), on container and access_policy. I'll create a separate issue to allow to opt-out of the current invalidateAll() implementation and handle it as a deleteAll().
I also want to investigate the access policy implementation.
Comment #8
berdirMerged. Next step: #3500680: Allow to remove support for invalidateAll() and treat it as deleteAll()