Repository navigation
fix metric access cache leaks - #5484
IvanIvanoff wants to merge 7 commits into
Conversation
All price pair metrics shared one cache entry, and the TTL was passed as part of the key.
The key used context[:product_id], which is never set. It now holds the plan, the requested and subscription products, and compact bundle and grant keys (packages and snapshot version, never metric lists). Raw signals and signal metadata now use it too.
Add the user's metric access level and lookback to the whole-query and availableProjects cache keys, filter address selector metrics by access level, fail closed on unknown levels and expire the alpha/beta sets on registry refresh.
Trending words and stories depend only on the plan, so they key on it alone. Released users without a lookback override share entries with anonymous users.
Add the data windows to the entitlement key, and the plan, status and compact entitlement and grant keys to the whole-query key, as updated_at has second precision.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Changes
Ticket
Checklist:
Summary by CodeRabbit