Cache not working on custom observables
See original GitHub issueIs this library only compatible with HTTP observables? I have a custom observable in which i control the execution of next and complete methods.
This is my code.
loadApplicationsWithCache(enumValue, {date: "").subscribe(this.onLoadApiComplete, this.onLoadApiError)
@Cacheable() loadApplicationsWithCache(status: someEnumType, date: someObject) : Observable<Map<string, Data>> { return this.loadApplicationsFromAPI.loadApplications(status, date); }
At first, the actual API is being called. The second invocation emits empty map.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Angular HTTP Client Interceptor not working when returning ...
I am currently trying to create an HttpClient Interceptor that caches GET requests and returns the cached response as an observable. I tried ......
Read more >Advanced caching with RxJS | Articles by thoughtram
To cache application data we usually use custom mechanisms. ... To make this work, we need a way to create an Observable from...
Read more >Question: side effects for caching in @computed values with ...
Problem hi! I'm new to mobx and am trying to implement caching for my application's state using @computed values but am running into...
Read more >Deriving information with computeds - MobX
Computed values can be used to derive information from other observables. They evaluate lazily, caching their output and only recomputing if one of...
Read more >How to use TS decorators to add caching logic to API calls
In case when cached observable isn't present, create a shared observable with invalidation stream, save it in cache storage and return it. Step ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
hello, still not able to make it work until now.
@crjacinro any updates?