From 47e497266c1ad11f326f2356c5556cfb096dfedb Mon Sep 17 00:00:00 2001 From: JustAnyone Date: Sun, 9 Nov 2025 23:35:38 +0200 Subject: [PATCH] Try to cache file responses for 7 days --- T120B165-ImgBoard/Controllers/PostController.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/T120B165-ImgBoard/Controllers/PostController.cs b/T120B165-ImgBoard/Controllers/PostController.cs index b16f88d..caa425d 100644 --- a/T120B165-ImgBoard/Controllers/PostController.cs +++ b/T120B165-ImgBoard/Controllers/PostController.cs @@ -273,6 +273,7 @@ public class PostController( /// If request is malformed /// If post or file is not found [HttpGet("{postId:int}/files/{fileId:int}")] + [ResponseCache(Duration = 604800, Location = ResponseCacheLocation.Any)] // Cache for 7 days [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] [ProducesResponseType(StatusCodes.Status404NotFound)]