summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2016-12-13 19:23:56 -0800
committerenahum <nahumhbl@gmail.com>2016-12-14 00:23:56 -0300
commit2e58f7504b79fc85d43468ffa06954a23221ea32 (patch)
tree3ee339c94bcda186b0d9bdc441ff6473c69d7c5c /api
parentaacbe995483b694e169acdc63136171dff3725d9 (diff)
downloadchat-2e58f7504b79fc85d43468ffa06954a23221ea32.tar.gz
chat-2e58f7504b79fc85d43468ffa06954a23221ea32.tar.bz2
chat-2e58f7504b79fc85d43468ffa06954a23221ea32.zip
PLT-4983 Adding file info caching (#4781)
Diffstat (limited to 'api')
-rw-r--r--api/post.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/api/post.go b/api/post.go
index 69d190e52..143dbf7e1 100644
--- a/api/post.go
+++ b/api/post.go
@@ -1687,6 +1687,7 @@ func getFileInfosForPost(c *Context, w http.ResponseWriter, r *http.Request) {
if HandleEtag(etag, w, r) {
return
} else {
+ w.Header().Set("Cache-Control", "max-age=2592000, public")
w.Header().Set(model.HEADER_ETAG_SERVER, etag)
w.Write([]byte(model.FileInfosToJson(infos)))
}