Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for NewLRUExpireCache (0.17 sec)

  1. staging/src/k8s.io/apimachinery/pkg/util/cache/lruexpirecache_test.go

    	}
    }
    
    func TestSimpleGet(t *testing.T) {
    	c := NewLRUExpireCache(10)
    	c.Add("long-lived", "12345", 10*time.Hour)
    
    	assertKeys(t, c.Keys(), []interface{}{"long-lived"})
    
    	expectEntry(t, c, "long-lived", "12345")
    }
    
    func TestSimpleRemove(t *testing.T) {
    	c := NewLRUExpireCache(10)
    	c.Add("long-lived", "12345", 10*time.Hour)
    	c.Remove("long-lived")
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 03 18:40:48 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/util/cache/lruexpirecache.go

    	clock Clock
    
    	lock sync.Mutex
    
    	maxSize      int
    	evictionList list.List
    	entries      map[interface{}]*list.Element
    }
    
    // NewLRUExpireCache creates an expiring cache with the given size
    func NewLRUExpireCache(maxSize int) *LRUExpireCache {
    	return NewLRUExpireCacheWithClock(maxSize, realClock{})
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 03 18:40:48 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  3. pkg/kubelet/clustertrustbundle/clustertrustbundle_manager.go

    	// factory, or the informer won't be registered to be started.
    	m := &InformerManager{
    		ctbInformer:        bundles.Informer(),
    		ctbLister:          bundles.Lister(),
    		normalizationCache: lrucache.NewLRUExpireCache(cacheSize),
    		cacheTTL:           cacheTTL,
    	}
    
    	// Have the informer bust cache entries when it sees updates that could
    	// apply to them.
    	_, err := m.ctbInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 03 18:40:48 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  4. plugin/pkg/admission/imagepolicy/admission.go

    	if err != nil {
    		return nil, err
    	}
    	return &Plugin{
    		Handler:       admission.NewHandler(admission.Create, admission.Update),
    		webhook:       gw,
    		responseCache: cache.NewLRUExpireCache(1024),
    		allowTTL:      whConfig.AllowTTL,
    		denyTTL:       whConfig.DenyTTL,
    		defaultAllow:  whConfig.DefaultAllow,
    	}, nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 02 06:05:06 UTC 2023
    - 9.8K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go

    	}
    	if cm != nil {
    		cm.AuthorizerType = "Webhook"
    		cm.AuthorizerName = name
    		cm.Metrics = am
    	}
    	return &WebhookAuthorizer{
    		subjectAccessReview: subjectAccessReview,
    		responseCache:       cache.NewLRUExpireCache(8192),
    		authorizedTTL:       authorizedTTL,
    		unauthorizedTTL:     unauthorizedTTL,
    		retryBackoff:        retryBackoff,
    		decisionOnError:     decisionOnError,
    		metrics:             am,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 04 19:01:15 UTC 2024
    - 18.4K bytes
    - Viewed (0)
Back to top