Search⌘ K

Use Cases of Caching Streams

Explore the practical uses of caching streams to optimize HTTP requests and manage expensive side effects like logging or complex computations. Understand how caching with the share operator can enhance performance by executing costly treatments only once, benefiting your reactive applications.

Optimizing the HTTP requests

The first use case is optimizing the HTTP requests in order to enhance the performance of our web applications. All that you have to do is put the result in a cache that’s a shared place for all the consumers.

Accounting for expensive side effects on the streams

There’s another use case where caching streams makes a lot of sense: ...