angelnikolov / ts-cacheable

Observable/Promise Cache Decorator
https://npmjs.com/package/ts-cacheable
ISC License
340 stars 42 forks source link

Adding async storage strategy to export #75

Closed cognitivedesire closed 4 years ago

cognitivedesire commented 4 years ago

Hello can you please add this update and create a new npm build, I am stuck right now

angelnikolov commented 4 years ago

@cognitivedesire Sure thing, give me an hour :)

cognitivedesire commented 4 years ago

Also can I use PCacheable on Observable returning method? And can you explain what is async on ICacheConfig

angelnikolov commented 4 years ago

async adds additional delay() to Cacheable only. It's done so projects using angularjs can still run without the requirement of having additional $scope.$apply and etc.. You can't use PCacheable on Observable returning method, only Cacheable..

cognitivedesire commented 4 years ago

Thanks for clarifying, please do let me know when it's out on npm

angelnikolov commented 4 years ago

@cognitivedesire 1.4.1 is published.

cognitivedesire commented 4 years ago

Thank you so much

cognitivedesire commented 4 years ago

@angelnikolov I am not able to use DomStorageStrategy, I am setting the global config in app.component's constructor

angelnikolov commented 4 years ago

Well, the best thing to do now would be to create a stackblitz or codesandbox with that issue reproducing. Not sure how I can help otherwise :)

cognitivedesire commented 4 years ago

I'll do that but generally where do you suggest to keep global config