- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for nil (0.13 sec)
-
internal/config/cache/cache.go
configLock.RLock() defer configLock.RUnlock() if !c.Enable { return nil, nil } if c.Endpoint == "" { // Endpoint not set, make this a no-op return nil, nil } buf, err := r.MarshalMsg(nil) if err != nil { return nil, err } // We do not want Gets to take so much time, anything // beyond 250ms we should cut it, remote cache is too
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Jan 18 07:03:17 GMT 2024 - 5.6K bytes - Viewed (0) -
internal/cachevalue/cache.go
vTime := t.lastUpdateMs.Load() tNow := time.Now().UnixMilli() if v != nil && tNow-vTime < ttl.Milliseconds() { if v.e == nil { return v.v, nil } if v.e != nil && t.opts.CacheError || t.opts.ReturnLastGood { return v.v, v.e } } // Fetch new value. if t.opts.NoWait && v != nil && tNow-vTime < ttl.Milliseconds()*2 && (v.e == nil || t.opts.CacheError) { if t.updating.TryLock() { go func() {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Fri Mar 01 16:00:42 GMT 2024 - 4.2K bytes - Viewed (0)