I am using a caching for some data retrieved from an API, for logical reasons the stored data is valid only for a limited time, so I am making use of something like: someApiData$ = this.getData() .pipe(shareReplay(1, 3000)) What seems to be obvious to me but apparently is not to the creator of the shareReplay operator is that if the data is no longer cached it should be re-fetched, or at the very least I should have another parameter that will give me this option, something like: someApiData$ = this.getData() .pipe(shareReplay(1, 3000, shouldRefresh)) Instead, what the next subscriber will get is null. So, I am looking for an elegant solution to this issue. Continue reading...