package cache
import "k8s.io/kubernetes/pkg/util/cache"
Index ¶
- type Cache
- func NewCache(maxSize int) Cache
- func (c *Cache) Add(index uint64, obj interface{}) bool
- func (c *Cache) Get(index uint64) (obj interface{}, found bool)
- type LRUExpireCache
Types ¶
type Cache ¶
type Cache []*cacheShard
func NewCache ¶
func (*Cache) Add ¶
Returns true if object already existed, false otherwise.
func (*Cache) Get ¶
type LRUExpireCache ¶
type LRUExpireCache struct {
// contains filtered or unexported fields
}
func NewLRUExpireCache ¶
func NewLRUExpireCache(maxSize int) *LRUExpireCache
func (*LRUExpireCache) Add ¶
func (c *LRUExpireCache) Add(key lru.Key, value interface{}, ttl time.Duration)
func (*LRUExpireCache) Get ¶
func (c *LRUExpireCache) Get(key lru.Key) (interface{}, bool)
Source Files ¶
cache.go lruexpirecache.go
- Version
- v1.4.0-beta.5
- Published
- Sep 15, 2016
- Platform
- js/wasm
- Imports
- 3 packages
- Last checked
- 10 minutes ago –
Tools for package owners.