Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for We (0.21 sec)

  1. internal/cachevalue/cache.go

    		if t.updating.TryLock() {
    			go func() {
    				defer t.updating.Unlock()
    				t.update()
    			}()
    		}
    		return v.v, v.e
    	}
    
    	// Get lock. Either we get it or we wait for it.
    	t.updating.Lock()
    	if time.Since(time.UnixMilli(t.lastUpdateMs.Load())) < ttl {
    		// There is a new value, release lock and return it.
    		v = t.valErr.Load()
    		t.updating.Unlock()
    		return v.v, v.e
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Mar 01 16:00:42 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  2. internal/config/cache/cache.go

    	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
    	// busy already.
    	ctx, cancel := context.WithTimeout(context.Background(), 250*time.Millisecond)
    	defer cancel()
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 5.6K bytes
    - Viewed (0)
Back to top