fixed gallery comment cache

This commit is contained in:
orangix 2023-08-15 19:56:33 +02:00
parent ab95ee5e2b
commit 268dbe3d35
No known key found for this signature in database
GPG Key ID: C31D4A86601C8416

View File

@ -9,6 +9,7 @@ import (
"codeberg.org/rimgo/rimgo/utils"
"github.com/dustin/go-humanize"
"github.com/microcosm-cc/bluemonday"
"github.com/patrickmn/go-cache"
"github.com/tidwall/gjson"
"gitlab.com/golang-commonmark/linkify"
)
@ -55,6 +56,7 @@ func (client *Client) FetchComments(galleryID string) ([]Comment, error) {
)
wg.Wait()
client.Cache.Set(galleryID+"-comments", comments, cache.DefaultExpiration)
return comments, nil
}