Skip to content
This repository was archived by the owner on Jun 23, 2025. It is now read-only.

fix 2 performance issues #50

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

fix 2 performance issues #50

wants to merge 9 commits into from

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant