By using Http, we call a method that does a network call and returns an http observable:
getCustomer() {
return
rxjs 5.4.0 has a new shareReplay method.
The author explicitly says "ideal for handling things like caching AJAX results"
rxjs PR #2443 feat(shareReplay): adds shareReplay variant of publishReplay
shareReplay returns an observable that is the source multicasted over a ReplaySubject. That replay subject is recycled on error from the source, but not on completion of the source. This makes shareReplay ideal for handling things like caching AJAX results, as it's retryable. It's repeat behavior, however, differs from share in that it will not repeat the source observable, rather it will repeat the source observable's values.