add Cache Header to Thumbnail Response for improved library performance (#228)

This commit is contained in:
Sascha Hahne
2021-10-26 20:16:38 +02:00
committed by GitHub
parent 0057b35a0a
commit be1918c769
@@ -37,6 +37,8 @@ object MangaController {
future { Manga.getMangaThumbnail(mangaId, useCache) }
.thenApply {
ctx.header("content-type", it.second)
val httpCacheSeconds = 60 * 60 * 24
ctx.header("cache-control", "max-age=$httpCacheSeconds")
it.first
}
)