question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cache not working on custom observables

See original GitHub issue

Is 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:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
crjacinrocommented, Jan 18, 2019

hello, still not able to make it work until now.

0reactions
angelnikolovcommented, Jan 18, 2019

@crjacinro any updates?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found