Skip to content

fix 2 performance issues #50

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Conversation

Jimbolino
Copy link
Contributor

@Jimbolino Jimbolino commented Jul 4, 2024

I've noticed a performance penalty when calling getFeatures() multiple times in one request.
This is because on every call, it has to read and write the features from (redis) cache.
I've also taken into account that some processes might be running for a long time, thats why i'm saving/checking the time()

Secondly i've added a middleware that can run during shutdown.
It will update the unleash cache when it's about to expire.
This way the next user doesn't get the "penalty" at the start of their request.

@Jimbolino Jimbolino changed the title do not fetch from cache every time fix 2 performance issues Jul 5, 2024
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.

1 participant