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

Remove guard.history after setting in cache #69

Open
CalebCourier opened this issue Aug 27, 2024 · 1 comment
Open

Remove guard.history after setting in cache #69

CalebCourier opened this issue Aug 27, 2024 · 1 comment

Comments

@CalebCourier
Copy link
Contributor

Currently, if guards are loaded from a config, their history is held in memory. We already have an endpoint for fetching history for a specific guard call that we use when communicating between the client and the server. This cache applies a 5 minute TTL on each history entry as well as limits the cache to only 50 entries to prevent memory leaks.

However, since the guards are now objects kept in memory in the config rather than constructed JIT from the database, history is still being held on the guard instances. We should delete/reset Guard.history to an empty Stack once a /validate call is done. We should also investigate other means of dumping/persisting history somewhere else via a logging API.

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

No branches or pull requests

2 participants
@CalebCourier and others