feat: add cache to the getCoverArt endpoint, avoid it being reloaded every single time in the UI

This commit is contained in:
Deluan
2020-02-15 14:20:04 -05:00
parent 272d897ec9
commit 3b12c92ad5
4 changed files with 23 additions and 15 deletions
+1
View File
@@ -39,6 +39,7 @@ func (c *MediaRetrievalController) GetCoverArt(w http.ResponseWriter, r *http.Re
}
size := utils.ParamInt(r, "size", 0)
w.Header().Set("cache-control", "public, max-age=300")
err = c.cover.Get(r.Context(), id, size, w)
switch {