Try to cache file responses for 7 days

This commit is contained in:
2025-11-09 23:35:38 +02:00
parent f338232451
commit 47e497266c

View File

@@ -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)]