Use always strings for cache keys (#13631)
* Use always strings for cache keys * fixing tests * Addressing PR review comments * Adding the base to FormatInt * Fix typo
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
d881b68a38
Коммит
06fb1458ca
@@ -51,7 +51,7 @@ func getOpenGraphMetadata(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
og := c.App.GetOpenGraphMetadata(url)
|
||||
ogJSON, err := og.ToJSON()
|
||||
openGraphDataCache.AddWithExpiresInSecs(props["url"], ogJSON, 3600) // Cache would expire after 1 hour
|
||||
openGraphDataCache.AddWithExpiresInSecs(url, ogJSON, 3600) // Cache would expire after 1 hour
|
||||
if err != nil {
|
||||
w.Write([]byte(`{"url": ""}`))
|
||||
return
|
||||
|
||||
Ссылка в новой задаче
Block a user