Created
August 14, 2019 16:58
-
-
Save debugmodedotnet/05c4e89a110d368a043d142d7a2dbf92 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Route("Data")] | |
[HttpGet] | |
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