[meta] Improve reports and cache performance investigation features

Created on 18 January 2025, 3 months ago

Problem/Motivation

Some ideas on how to further improve the cache report page and related features. Unsure whether they belong in the redis module, but it's in a relatively good position to do some of these. Just writing down some thoughts to keep track of it.

  • Sometimes it's not clear where cache tag invalidations come from. Could add a feature that allows to track certain frequent cache tags and that would log with backtrace when it happens
  • Track opt-in metadata on cache entries, such as:
    • Cache items with frequently invalidated cache tags (opt in per cache tag and bin, e.g. node_list on render). How to track this efficiently, by what?
    • Similar but different perspective: Keep an invalidation count and keep track of the most frequently invalidated items (on cache get that is found but invalid, remember current count, when written, increment by one. a sorted set to keep track of top 10?). This might be a better approach than above
    • Build time of cache entries, possibly compared to cache load, identify caches that are very fast to build, possibly to the point of being faster to build than fetch on a cache get. Could be combined with a feature to ignore cache gets with certain prefix, e.g. certain blocks. Core currently lacks

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🌱 Plan
Status

Active

Version

1.0

Component

Code

Created by

🇨🇭Switzerland berdir Switzerland

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024