-2

I have an angular 9 app that needs to work with a ASP.NET Web API 2 RESTful backend without any caching happening.

I've put 'Cache-control: no-cache' header on the request coming from the frontend (using Angular's interceptors).

Am I correct in assuming that ASP.NET Web API 2 does NOT cache GET requests by default so I won't need to manually disable caching on the server side? It would make sense to me since REST is stateless but I need to be absolutely sure.

Thanks.

coffeeeee
  • 129
  • 1
  • 12

1 Answers1

1

Web API 2 does not cache it's output by default.

This answer was just updated the other day it seems, and even though it's "original" web API, web API 2 didn't implement any default caching mechanism either. How to use caching in ASP.NET Web API?

It looks like the github link has also been updated to work with web API 2.

Craig H
  • 2,001
  • 1
  • 14
  • 18