-
Notifications
You must be signed in to change notification settings - Fork 42
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
Instant cache busting #123
Instant cache busting #123
Conversation
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.
Great PR! (loved the tests!) I will take a better look tomorrow, but for now I left two comments.
Also, your indentation seems to be different than the project's.
Also, do you mind adding a couple of more Unit tests to promise-cacheable.decorator.spec.ts
and observable-cacheable.decorator.spec.ts
which test the new flag in integration with a @PCacheable
and @Cacheable
?
Codecov ReportBase: 75.08% // Head: 77.30% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #123 +/- ##
==========================================
+ Coverage 75.08% 77.30% +2.21%
==========================================
Files 12 13 +1
Lines 301 326 +25
Branches 79 83 +4
==========================================
+ Hits 226 252 +26
Misses 60 60
+ Partials 15 14 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Let me fix the indentation and add a couple of unit tests |
Hey I added unit tests for observable cachable and promise cachable decorator. The one in promise is currently disabled due to some strange bug in AsyncStorageStrategy tests. It fails ocasionally (when run with npm run test, calling only the single test works fine). The problem appears on master too, when |
@ragtam Tried your and ran the tests multiple times and unfortunately couldn't get it to fail. |
Hey, it |
@angelnikolov it took me some time but finally its working. The issue was quite trivial: |
Failure unrelated. Merging. |
This is a PR related to issue #121
Adds
isInstant
property toICacheBusterConfig
.This is used as a predicate wether to clear cache before decorated method has been executed. If no
isInstant
property is set (default behaviour), then cache is cleared same way as it used to be, i.e after observable has emitted for@CacheBuster()
, or after promise has been resolved for@PCacheBuster()
. No breaking changes.