Try to cache file responses for 7 days
This commit is contained in:
@@ -273,6 +273,7 @@ public class PostController(
|
|||||||
/// <response code="400">If request is malformed</response>
|
/// <response code="400">If request is malformed</response>
|
||||||
/// <response code="404">If post or file is not found</response>
|
/// <response code="404">If post or file is not found</response>
|
||||||
[HttpGet("{postId:int}/files/{fileId:int}")]
|
[HttpGet("{postId:int}/files/{fileId:int}")]
|
||||||
|
[ResponseCache(Duration = 604800, Location = ResponseCacheLocation.Any)] // Cache for 7 days
|
||||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
||||||
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
||||||
|
|||||||
Reference in New Issue
Block a user