mirror of
https://codeberg.org/video-prize-ranch/rimgo.git
synced 2025-12-14 20:25:17 +00:00
fixed gallery comment cache
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
|||||||
"codeberg.org/rimgo/rimgo/utils"
|
"codeberg.org/rimgo/rimgo/utils"
|
||||||
"github.com/dustin/go-humanize"
|
"github.com/dustin/go-humanize"
|
||||||
"github.com/microcosm-cc/bluemonday"
|
"github.com/microcosm-cc/bluemonday"
|
||||||
|
"github.com/patrickmn/go-cache"
|
||||||
"github.com/tidwall/gjson"
|
"github.com/tidwall/gjson"
|
||||||
"gitlab.com/golang-commonmark/linkify"
|
"gitlab.com/golang-commonmark/linkify"
|
||||||
)
|
)
|
||||||
@@ -55,6 +56,7 @@ func (client *Client) FetchComments(galleryID string) ([]Comment, error) {
|
|||||||
)
|
)
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
|
||||||
|
client.Cache.Set(galleryID+"-comments", comments, cache.DefaultExpiration)
|
||||||
return comments, nil
|
return comments, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user