Distributed caching
With the help of distributed caching techniques, we can improve the scalability of our RESTful web services (web API). A distributed cache can be stored on multiple nodes of a cluster. A distributed cache enhances a web service's throughput, as the cache no longer requires an I/O trip to any external resource.
This approach has the following advantages:
- Clients get the same results
- The distributed cache is backed up by a persistence store and runs as a different remote process; even if the app server restarts or has any problems, it in no way affects the cache
- The source's data store has fewer requests made to it
Caching persisted data (data-tier caching)
Similar to application performance, you should also be considering database performance. By caching persisted data, you will get better performance after adding a caching layer to your database. This is also important when read requests are heavily used in an application. We will now take a look at EF Core’s levels of caching...