Junior From PDF REST API ASP.NET Web API

What is the cacheability principle in REST?

Responses from the server should indicate whether they are cacheable or not, to improve

performance and scalability. Clients and intermediaries can reuse cached responses.

👉 Example in ASP.NET Core:

[HttpGet("products")]

[ResponseCache(Duration = 60)] // Cache for 60 seconds

public IActionResult GetProducts()
{
return Ok(new[] { "Laptop", "Mouse", "Keyboard" });
}

More from ASP.NET Core Web API Tutorial

All questions for this course
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details