Skip to content

Commit be1918c

Browse files
authored
add Cache Header to Thumbnail Response for improved library performance (#228)
1 parent 0057b35 commit be1918c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

server/src/main/kotlin/suwayomi/tachidesk/manga/controller/MangaController.kt

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ object MangaController {
3737
future { Manga.getMangaThumbnail(mangaId, useCache) }
3838
.thenApply {
3939
ctx.header("content-type", it.second)
40+
val httpCacheSeconds = 60 * 60 * 24
41+
ctx.header("cache-control", "max-age=$httpCacheSeconds")
4042
it.first
4143
}
4244
)

0 commit comments

Comments
 (0)