Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add periodic in-memory store pruner #200

Merged
merged 5 commits into from
Oct 27, 2024

Conversation

jimmypw
Copy link
Contributor

@jimmypw jimmypw commented Oct 26, 2024

Implement better memory management for the in memory store.

Currently secrets only get deleted once they are read while still valid or attempted to be read once expired. This change implements a go routine that periodically iterates over secrets held in memory and if the secret is expired, deletes it. This will lead to better memory efficiency as expired secrets without any desire to be read won't linger in memory indefinitely.

pkg/storage/memory/memory.go Outdated Show resolved Hide resolved
pkg/storage/memory/memory.go Outdated Show resolved Hide resolved
pkg/storage/memory/memory.go Outdated Show resolved Hide resolved
@Luzifer Luzifer added this to the 1.14.0 milestone Oct 27, 2024
@Luzifer Luzifer changed the title feat: periodic in-memory store pruner Add periodic in-memory store pruner Oct 27, 2024
@Luzifer Luzifer merged commit 0049bc0 into Luzifer:master Oct 27, 2024
4 checks passed
@Luzifer
Copy link
Owner

Luzifer commented Oct 27, 2024

Thanks for adding the cleanup! Though the in-mem store should only be used for testing, it's good to have it properly managed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants