this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

identity: remove (impossible) panic

+3 -9
+3 -9
atproto/identity/cache_catalog.go
··· 33 33 var _ Catalog = (*CacheCatalog)(nil) 34 34 35 35 func NewCacheCatalog(inner Catalog) CacheCatalog { 36 - // TODO: these are kind of arbitrary default values... 37 - hitTTL, err := time.ParseDuration("1h") 38 - if err != nil { 39 - panic(err) 40 - } 41 - errTTL, err := time.ParseDuration("2m") 42 - if err != nil { 43 - panic(err) 44 - } 36 + // NOTE: these are kind of arbitrary default values... 37 + hitTTL := time.Duration(1e9 * 60 * 60) // 1 hour 38 + errTTL := time.Duration(1e9 * 60 * 2) // 2 minutes 45 39 return CacheCatalog{ 46 40 HitTTL: hitTTL, 47 41 ErrTTL: errTTL,