Skip to content

Invalidating Cache Middleware#381

Merged
agubler merged 3 commits into
dojo:masterfrom
agubler:icache-middleware
Jun 6, 2019
Merged

Invalidating Cache Middleware#381
agubler merged 3 commits into
dojo:masterfrom
agubler:icache-middleware

Conversation

@agubler
Copy link
Copy Markdown
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