mirror of
https://codeberg.org/video-prize-ranch/rimgo.git
synced 2025-07-20 09:58:23 +00:00
fixed gallery comment cache
This commit is contained in:
parent
ab95ee5e2b
commit
268dbe3d35
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user