# Output Caching

Storing whole responses on the server and replaying them.

## What is **Output Caching**?

**Output caching** stores whole responses on the server and replays them for matching requests, skipping your code entirely until the cache expires.

```csharp
builder.Services.AddOutputCache();
...
app.UseOutputCache();
app.MapGet("/categories", List).CacheOutput(p => p.Expire(TimeSpan.FromMinutes(5)));
```

Level: Freelancer · [More ASP.NET Core terms at this level](https://www.ask-codey.com/glossary?category=aspnet-core&level=4)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/output-caching
