Performance: Handle badger cache invalidation and extend TTLs - #3584
Open
shleeable wants to merge 5 commits into
Open
Performance: Handle badger cache invalidation and extend TTLs#3584shleeable wants to merge 5 commits into
shleeable wants to merge 5 commits into
Conversation
- Create badgerCacheInvalidation module with helpers to invalidate specific cache entries - Wire invalidation into updateResource (clears resource, headerAuth, userAccess caches) - Wire invalidation into createResourceRule, updateResourceRule, deleteResourceRule - Wire invalidation into deleteResource - Increase resource/rules/headerAuth cache TTLs to 1 hour (safe with invalidation) - Keep session cache at 60s as a safety net (session deletion paths are numerous) - Keep userAccess/userData at 12s (role changes touch too many paths for this PR) Cache invalidation is immediate for the same process. This eliminates stale data for the common admin operations (updating resource settings, toggling rules) while dramatically reducing DB load on the hot request path.
shleeable
requested review from
miloschwartz and
oschwartz10612
as code owners
August 14, 2026 05:50
shleeable
marked this pull request as draft
August 14, 2026 06:04
shleeable
marked this pull request as ready for review
August 14, 2026 06:12
shleeable
marked this pull request as draft
August 14, 2026 06:14
shleeable
force-pushed
the
feature/cache-ttl-increase
branch
from
August 14, 2026 06:18
667fa20 to
06b4e43
Compare
shleeable
marked this pull request as ready for review
August 14, 2026 06:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Community Contribution License Agreement
By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.
Description
Cache invalidation is immediate for the same process. This eliminates stale data for the common admin operations (updating resource settings, toggling rules) while dramatically reducing DB load on the hot request path.
How to test?