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

Invalidating Cache Middleware #381

Merged
merged 3 commits into from
Jun 6, 2019
Merged

Conversation

agubler
Copy link
Member

@agubler agubler commented Jun 6, 2019

Type: feature

The following has been addressed in the PR:

Description:

Built on top of the cache middleware, the icache middleware manages lazily value resolution and invalidation.

getOrSet: Gets an existing resolved value if it exists in the cache, otherwise sets the value passed.
set: Sets the value passed, if the value is a function it will be called and the returned result stored in the cache, or if the result is a promise then it will be added as pending and when the promise is resolved will update the value and invalidate.
get: Gets the value for the key or returns undefined if there is no entry or the result is pending.

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