-
Notifications
You must be signed in to change notification settings - Fork 34
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
feat(data-point-service): run outputType before adding entry #452
feat(data-point-service): run outputType before adding entry #452
Conversation
output type if set, it must pass in order for the entry to be added to cache store fix ViacomInc#451
@@ -19,74 +19,72 @@ $ npm install data-point-cache | |||
|
|||
Create a new DataPoint Service Object | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
truly sorry for all of these changes, it seems the file had not been ran via prettier before. my only change on this file is marked at the bottom of the file
|
||
In the case the revalidation fails the flag will be removed to allow a new revalidation to be triggered. | ||
|
||
It is important to know that once the `staleWhileRevalidate` delta has also expired a background revalidation will no longer be triggered and cold lookup will be triggered instead. For this reason it is important to carefully set the cache settings to have a solid caching strategy. | ||
|
||
### Validation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the only part I added regarding this PR
Codecov Report
@@ Coverage Diff @@
## master #452 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 139 139
Lines 1972 1978 +6
Branches 195 197 +2
=========================================
+ Hits 1972 1978 +6
Continue to review full report at Codecov.
|
packages/data-point-service/examples/express-cache-schema-revalidation.js
Outdated
Show resolved
Hide resolved
packages/data-point-service/examples/express-cache-schema-revalidation.js
Outdated
Show resolved
Hide resolved
|
||
const HelloWorld = DataPoint.Model("HelloWorld", { | ||
value: (input, acc) => { | ||
// const id = parseInt(acc.locals.query.id, 10); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove comment
packages/data-point-service/examples/express-cache-schema-revalidation.js
Outdated
Show resolved
Hide resolved
b03d0fe
What:
fixes #451
if
outputType
reducer is set, it must pass in order for the entry to be added to the cache store.Why:
See #451
How:
By running executing outputType reducer before adding the entry into the cache store.
Checklist: