Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for tf (0.13 sec)

  1. internal/cachevalue/cache.go

    	t.Once.Do(func() {
    		t.ttl = ttl
    		t.updateFn = update
    		t.opts = opts
    	})
    }
    
    // Get will return a cached value or fetch a new one.
    // Tf the Update function returns an error the value is forwarded as is and not cached.
    func (t *Cache[T]) Get() (T, error) {
    	v := t.valErr.Load()
    	ttl := t.ttl
    	vTime := t.lastUpdateMs.Load()
    	tNow := time.Now().UnixMilli()
    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)
Back to top