Chapter 9: Caching Streams
Caching data and assets is one of the most efficient ways to improve the user experience of our web applications. It is a good way to speed up the load times of our web applications and keep the number of network requests to a minimum.
We will start this chapter by defining the caching requirement for the client side and the motivation behind it. Then, we will learn how to implement this requirement in a reactive way and explore the useful operators in RxJS. After that, we will describe a better way to do it using RxJS 7. Finally, we will highlight the use cases of caching streams.
In this chapter, we're going to cover the following main topics:
- Defining the requirement
- Learning about using the reactive pattern to cache streams
- Exploring the RxJS 7 recommended pattern to cache streams
- Highlighting the use cases of caching streams