Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public HttpResponseMessage GetData()
var data = GetAllTrainings();
HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, data);
response.Headers.CacheControl = new CacheControlHeaderValue()
MaxAge = TimeSpan.FromMinutes(20)
return response;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment