Reactive Caching of HTTP Service

前端 未结 3 807
后悔当初
后悔当初 2021-02-12 13:01

I am using RsJS 5 (5.0.1) to cache in Angular 2. It works well.

The meat of the caching function is:

const observable = Observable.defer(
    () => a         


        
3条回答
  •  清歌不尽
    2021-02-12 13:54

    Almost any complicated logic quickly goes out of control if you use plain rxjs. I would rather implement custom cache operator from scratch, you can use this gist as an example.

提交回复
热议问题