Weather — Page Caching | Blazor Blueprint
Login Register

📋 What is Page Output Caching?

The page uses ASP.NET Core's [OutputCache] attribute to cache the complete rendered HTML in Redis. Subsequent visitors get the cached HTML instantly without re-rendering the page.

What's Cached: Entire HTML page (complete output)
Where It's Stored: Redis
Cache Duration: 60 seconds
First Load: ~5 seconds (API call + page render)
Cached Loads: Instant (served directly from Redis)

🧪 Page Cache Testing

Instructions for testing the page cache functionality

💡 Test: The page loads instantly and shows loading state while fetching fresh data each time!
⏱️ Note: The API call takes ~5 seconds due to the artificial delay, but the page displays immediately with a loading state.
🚀 Page Loading: Demonstrates fast page rendering with interactive loading states and user feedback!
🔄 How to Test: Click "Test Page Loading" → Page loads instantly, then data loads asynchronously with loading indicators!

⏱️ Page Cached At

This HTML was generated and cached at:

Cache timestamp: 16:20:01.163
Tenant: blazorblueprint Data returned by Application Service API for this organisation

🌤️ Weather Forecast

Current weather data (cached in Redis at API controller level)

Date
Temp. (C)
Temp. (F)
Summary
05/08/20262984Scorching
06/08/2026-524Freezing
07/08/2026-622Freezing
08/08/20261762Chilly
09/08/2026032Mild

🔄 Test Page Loading

Test the page loading functionality

🔄 Test Page Output Cache (Refresh Page)

👆 This link refreshes the page - entire HTML output is cached for 60 seconds!

Notice: First load is slow (~5 seconds API call), subsequent loads are instant (cached HTML served directly).

After 60 seconds, cache expires and the page will call the API again.

Welcome! How can we help you today?
An unhandled error has occurred. Reload