summaryrefslogtreecommitdiffstats
path: root/api/post.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/post.go')
-rw-r--r--api/post.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/post.go b/api/post.go
index 4944ad28f..afe60144d 100644
--- a/api/post.go
+++ b/api/post.go
@@ -530,11 +530,11 @@ func getOpenGraphMetadata(c *Context, w http.ResponseWriter, r *http.Request) {
og := app.GetOpenGraphMetadata(url)
ogJSON, err := og.ToJSON()
+ openGraphDataCache.AddWithExpiresInSecs(props["url"], ogJSON, 3600) // Cache would expire after 1 hour
if err != nil {
w.Write([]byte(`{"url": ""}`))
return
}
- openGraphDataCache.AddWithExpiresInSecs(props["url"], ogJSON, 3600) // Cache would expire after 1 houre
w.Write(ogJSON)
}