Technical requirements
For the recipes in this chapter, you’ll need the following:
- .NET 9 SDK: We will be installing the needed packages as we go.
- Docker Desktop: This is required for running Redis containers through .NET Aspire.
- All projects in this chapter are hooked up to an Aspire solution. Most can be run either by starting the solution and using the Aspire dashboard, or you can run the main API project from the command line. If you are going to run from the command line, we recommend running the
AppHost
project and theBookAPI
project from separate terminal splits, rather than running the solution file. - All recipes in this chapter come with a special web page client to better see the effects of the different caches we will explore. In each starter project, you can open the client with
test-cache.html
, as shown in Figure 10.1:

Figure 10.1 – Books API cache demonstration