- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for TTL (0.46 sec)
-
internal/cachevalue/cache.go
// update function, making it ready for use. func NewFromFunc[T any](ttl time.Duration, opts Opts, update func() (T, error)) *Cache[T] { return &Cache[T]{ ttl: ttl, updateFn: update, opts: opts, } } // InitOnce initializes the cache with a TTL and an update function. It is // guaranteed to be called only once. func (t *Cache[T]) InitOnce(ttl time.Duration, opts Opts, update func() (T, error)) { t.Once.Do(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) -
cmd/etcd.go
} } func saveKeyEtcdWithTTL(ctx context.Context, client *etcd.Client, key string, data []byte, ttl int64) error { timeoutCtx, cancel := context.WithTimeout(ctx, defaultContextTimeout) defer cancel() lease, err := client.Grant(timeoutCtx, ttl) if err != nil { return etcdErrToErr(err, client.Endpoints()) } _, err = client.Put(timeoutCtx, key, string(data), etcd.WithLease(lease.ID))
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 2.9K bytes - Viewed (0) -
cmd/iam-store.go
} err := store.saveMappedPolicy(ctx, cred.ParentUser, stsUser, false, mp, options{ttl: ttl}) if err != nil { return time.Time{}, err } cache.iamSTSPolicyMap.Store(cred.ParentUser, mp) } u := newUserIdentity(cred) err := store.saveUserIdentity(ctx, accessKey, stsUser, u, options{ttl: ttl}) if err != nil { return time.Time{}, err }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Sat Apr 27 10:04:10 GMT 2024 - 75.2K bytes - Viewed (2) -
cmd/common-main.go
} func runDNSCache(ctx *cli.Context) { dnsTTL := ctx.Duration("dns-cache-ttl") // Check if we have configured a custom DNS cache TTL. if dnsTTL <= 0 { if orchestrated { dnsTTL = 30 * time.Second } else { dnsTTL = 10 * time.Minute } } // Call to refresh will refresh names in cache.
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Sat May 04 00:17:57 GMT 2024 - 35.8K bytes - Viewed (2) -
cmd/server-main.go
Hidden: true, EnvVar: "MINIO_INTERFACE", }, cli.DurationFlag{ Name: "dns-cache-ttl", Usage: "custom DNS cache TTL", Hidden: true, Value: func() time.Duration { if orchestrated { return 30 * time.Second } return 10 * time.Minute }(), EnvVar: "MINIO_DNS_CACHE_TTL", }, cli.IntFlag{ Name: "max-idle-conns-per-host",
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Fri May 03 15:54:03 GMT 2024 - 34.9K bytes - Viewed (1) -
cmd/metrics-v2.go
metric.VariableLabels[k] = v } for k, v := range m.Histogram { metric.Histogram[k] = v } return metric } // Get - returns cached value always upton the configured TTL, // once the TTL expires "read()" registered function is called // to return the new values and updated. func (g *MetricsGroupV2) Get() (metrics []MetricV2) { m, _ := g.metricsCache.Get() if len(m) == 0 { return []MetricV2{}
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Apr 25 22:01:31 GMT 2024 - 132.6K bytes - Viewed (0)