Skip to content

Commit

Permalink
fix: cache images for 1 hour
Browse files Browse the repository at this point in the history
  • Loading branch information
revam committed Dec 19, 2023
1 parent fd9c729 commit 5c3958e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Shoko.Server/API/v3/Controllers/ImageController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class ImageController : BaseController
/// <param name="value">Usually the ID, but the resource name in the case of image/Shoko/Static/{value}</param>
/// <returns>200 on found, 400/404 if the type or source are invalid, and 404 if the id is not found</returns>
[HttpGet("{source}/{type}/{value}")]
[ResponseCache(Duration = 3600 /* 1 hour in seconds */)]
[ProducesResponseType(typeof(FileStreamResult), 200)]
[ProducesResponseType(404)]
public ActionResult GetImage([FromRoute] Image.ImageSource source, [FromRoute] Image.ImageType type,
Expand Down

0 comments on commit 5c3958e

Please sign in to comment.