Instead of using two different RuleStore implementations within the Ruler, use a single caching implementation and selectively disable caching when required.
This change removes the "direct" RuleStore implementation from the Ruler's gRPC and HTTP API layers. Instead, the caching implementation is used for all calls. In cases where caching returning stale results would not be acceptable, the caching is disabled just for that call.
This allows rule group contents to be safety cached with the understanding that it is safe to cache them because they will correctly invalidated when deleted or modified.
Which issue(s) this PR fixes or relates to
Part of #9386
Checklist
[x] Tests updated.
[ ] Documentation added.
[ ] CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX].
What this PR does
Instead of using two different
RuleStore
implementations within the Ruler, use a single caching implementation and selectively disable caching when required.This change removes the "direct"
RuleStore
implementation from the Ruler's gRPC and HTTP API layers. Instead, the caching implementation is used for all calls. In cases where caching returning stale results would not be acceptable, the caching is disabled just for that call.This allows rule group contents to be safety cached with the understanding that it is safe to cache them because they will correctly invalidated when deleted or modified.
Which issue(s) this PR fixes or relates to
Part of #9386
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.