diff options
author | 2022-12-16 22:36:52 +0000 | |
---|---|---|
committer | 2022-12-16 22:36:52 +0000 | |
commit | da751c02fb5c063ecd2ebda6d74a9c43fe04a379 (patch) | |
tree | f2580b0b3afe10ef6a7cc469b2f4e9f25fea5e3b /internal/cache/gts.go | |
parent | [chore/bugfix] Switch markdown from blackfriday to goldmark (#1267) (diff) | |
download | gotosocial-da751c02fb5c063ecd2ebda6d74a9c43fe04a379.tar.xz |
update go-cache to v3.2.0 with support for ignoring errors (#1273)
Diffstat (limited to 'internal/cache/gts.go')
-rw-r--r-- | internal/cache/gts.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/internal/cache/gts.go b/internal/cache/gts.go index 3fa25ddef..b21ab1ca3 100644 --- a/internal/cache/gts.go +++ b/internal/cache/gts.go @@ -185,7 +185,7 @@ func (c *gtsCaches) User() *result.Cache[*gtsmodel.User] { } func (c *gtsCaches) initAccount() { - c.account = result.NewSized([]result.Lookup{ + c.account = result.New([]result.Lookup{ {Name: "ID"}, {Name: "URI"}, {Name: "URL"}, @@ -200,7 +200,7 @@ func (c *gtsCaches) initAccount() { } func (c *gtsCaches) initBlock() { - c.block = result.NewSized([]result.Lookup{ + c.block = result.New([]result.Lookup{ {Name: "ID"}, {Name: "AccountID.TargetAccountID"}, {Name: "URI"}, @@ -220,7 +220,7 @@ func (c *gtsCaches) initDomainBlock() { } func (c *gtsCaches) initEmoji() { - c.emoji = result.NewSized([]result.Lookup{ + c.emoji = result.New([]result.Lookup{ {Name: "ID"}, {Name: "URI"}, {Name: "Shortcode.Domain"}, @@ -234,7 +234,7 @@ func (c *gtsCaches) initEmoji() { } func (c *gtsCaches) initEmojiCategory() { - c.emojiCategory = result.NewSized([]result.Lookup{ + c.emojiCategory = result.New([]result.Lookup{ {Name: "ID"}, {Name: "Name"}, }, func(c1 *gtsmodel.EmojiCategory) *gtsmodel.EmojiCategory { @@ -246,7 +246,7 @@ func (c *gtsCaches) initEmojiCategory() { } func (c *gtsCaches) initMention() { - c.mention = result.NewSized([]result.Lookup{ + c.mention = result.New([]result.Lookup{ {Name: "ID"}, }, func(m1 *gtsmodel.Mention) *gtsmodel.Mention { m2 := new(gtsmodel.Mention) @@ -257,7 +257,7 @@ func (c *gtsCaches) initMention() { } func (c *gtsCaches) initNotification() { - c.notification = result.NewSized([]result.Lookup{ + c.notification = result.New([]result.Lookup{ {Name: "ID"}, }, func(n1 *gtsmodel.Notification) *gtsmodel.Notification { n2 := new(gtsmodel.Notification) @@ -268,7 +268,7 @@ func (c *gtsCaches) initNotification() { } func (c *gtsCaches) initStatus() { - c.status = result.NewSized([]result.Lookup{ + c.status = result.New([]result.Lookup{ {Name: "ID"}, {Name: "URI"}, {Name: "URL"}, @@ -282,7 +282,7 @@ func (c *gtsCaches) initStatus() { // initTombstone will initialize the gtsmodel.Tombstone cache. func (c *gtsCaches) initTombstone() { - c.tombstone = result.NewSized([]result.Lookup{ + c.tombstone = result.New([]result.Lookup{ {Name: "ID"}, {Name: "URI"}, }, func(t1 *gtsmodel.Tombstone) *gtsmodel.Tombstone { @@ -294,7 +294,7 @@ func (c *gtsCaches) initTombstone() { } func (c *gtsCaches) initUser() { - c.user = result.NewSized([]result.Lookup{ + c.user = result.New([]result.Lookup{ {Name: "ID"}, {Name: "AccountID"}, {Name: "Email"}, |