This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Your user interface microservice obtains information from up to five other microservices to formulate pages. You want to optimize performance by caching each page. Which .NET Aspire integration should you use?
The .NET Aspire StackExchange Redis integration
.NET Aspire StackExchange Redis output caching integration
.NET Aspire StackExchange Redis distributed caching integration
You've installed and configured the .NET Aspire StackExchange Redis output caching integration. Now you want to ensure that the app's homepage is cached for 5 minutes. What should you do?
Use settings in the appsettings.json file to cache the homepage.
Use dependency injection to retrieve the cache object and add the homepage to it.
Add the OutputCache attribute to the Razor code for the homepage.
You're using the .NET Aspire StackExchange Redis distributed caching integration to cache information from your product catalog. Where should you call the AddRedisDistributedCache() method?
In the Program.cs file for each project that will use the cache
In the Program.cs file for the app host project
In Razor pages for each project that will use the cache
You must answer all questions before checking your work.
Was this page helpful?