summaryrefslogtreecommitdiffstats
path: root/api/post.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-12-19 10:16:22 -0500
committerGitHub <noreply@github.com>2016-12-19 10:16:22 -0500
commitf96173528f08684092b89f903f0389fe2b607192 (patch)
treef34f9057417ad6758cd65dc246bc764530f2134c /api/post.go
parent6a5cdd5cdf09317ce259dd146fc4f1cb76d8b9b6 (diff)
downloadchat-f96173528f08684092b89f903f0389fe2b607192.tar.gz
chat-f96173528f08684092b89f903f0389fe2b607192.tar.bz2
chat-f96173528f08684092b89f903f0389fe2b607192.zip
Adding metrics for caching mechanisms (#4828)
Diffstat (limited to 'api/post.go')
-rw-r--r--api/post.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/api/post.go b/api/post.go
index 7603c7955..1b855cab9 100644
--- a/api/post.go
+++ b/api/post.go
@@ -1291,7 +1291,7 @@ func getPosts(c *Context, w http.ResponseWriter, r *http.Request) {
etag := (<-etagChan).Data.(string)
- if HandleEtag(etag, w, r) {
+ if HandleEtag(etag, "Get Posts", w, r) {
return
}
@@ -1365,7 +1365,7 @@ func getPost(c *Context, w http.ResponseWriter, r *http.Request) {
if result := <-pchan; result.Err != nil {
c.Err = result.Err
return
- } else if HandleEtag(result.Data.(*model.PostList).Etag(), w, r) {
+ } else if HandleEtag(result.Data.(*model.PostList).Etag(), "Get Post", w, r) {
return
} else {
list := result.Data.(*model.PostList)
@@ -1406,7 +1406,7 @@ func getPostById(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
- if HandleEtag(list.Etag(), w, r) {
+ if HandleEtag(list.Etag(), "Get Post By Id", w, r) {
return
}
@@ -1447,7 +1447,7 @@ func getPermalinkTmp(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
- if HandleEtag(list.Etag(), w, r) {
+ if HandleEtag(list.Etag(), "Get Permalink TMP", w, r) {
return
}
@@ -1581,7 +1581,7 @@ func getPostsBeforeOrAfter(c *Context, w http.ResponseWriter, r *http.Request, b
}
etag := (<-etagChan).Data.(string)
- if HandleEtag(etag, w, r) {
+ if HandleEtag(etag, "Get Posts Before or After", w, r) {
return
}
@@ -1691,7 +1691,7 @@ func getFileInfosForPost(c *Context, w http.ResponseWriter, r *http.Request) {
etag := model.GetEtagForFileInfos(infos)
- if HandleEtag(etag, w, r) {
+ if HandleEtag(etag, "Get File Infos For Post", w, r) {
return
} else {
w.Header().Set("Cache-Control", "max-age=2592000, public")