This commit is contained in:
tobi
2021-09-30 11:16:23 +02:00
committed by GitHub
parent 36a09dd0df
commit 231075f28d
7 changed files with 21 additions and 40 deletions

View File

@ -7,7 +7,7 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
)
// statusCache is a wrapper around ttlcache.Cache to provide URL and URI lookups for gtsmodel.Status
// StatusCache is a wrapper around ttlcache.Cache to provide URL and URI lookups for gtsmodel.Status
type StatusCache struct {
cache *ttlcache.Cache // map of IDs -> cached statuses
urls map[string]string // map of status URLs -> IDs
@ -15,7 +15,7 @@ type StatusCache struct {
mutex sync.Mutex
}
// newStatusCache returns a new instantiated statusCache object
// NewStatusCache returns a new instantiated statusCache object
func NewStatusCache() *StatusCache {
c := StatusCache{
cache: ttlcache.NewCache(),