- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for recordCacheSize (0.16 sec)
-
staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2/cache.go
// SHA-256 is used to prevent collisions hashPool *sync.Pool providerName string mu sync.Mutex // guards call to set recordCacheSize func(providerName string, size int) // for unit tests } func newSimpleCache(clock clock.Clock, ttl time.Duration, providerName string) *simpleCache { cache := utilcache.NewExpiringWithClock(clock)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Aug 31 20:26:58 UTC 2023 - 3.5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2/cache_test.go
} func TestMetrics(t *testing.T) { fakeClock := testingclock.NewFakeClock(time.Now()) cache := newSimpleCache(fakeClock, 5*time.Second, "panda") var record sync.Map var cacheSize atomic.Uint64 cache.recordCacheSize = func(providerName string, size int) { if providerName != "panda" { t.Errorf(`expected "panda" as provider name, got %q`, providerName) } if _, loaded := record.LoadOrStore(size, nil); loaded {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Aug 31 20:26:58 UTC 2023 - 4.9K bytes - Viewed (0)