Documentation
¶
Index ¶
- type Cache
- func (c *Cache) Flush(resource allowlist.ResourceType) int
- func (c *Cache) Get(key string) *Entry
- func (c *Cache) InvalidateNamespace(host, repo string, resource allowlist.ResourceType) int
- func (c *Cache) Keys() []string
- func (c *Cache) OnEvict(fn func(key string))
- func (c *Cache) Set(entry *Entry)
- func (c *Cache) Size() int
- type Entry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is a thread-safe LRU cache with TTL support and namespace invalidation.
func (*Cache) Flush ¶
func (c *Cache) Flush(resource allowlist.ResourceType) int
Flush removes all entries, optionally filtered by resource type.
func (*Cache) InvalidateNamespace ¶
func (c *Cache) InvalidateNamespace(host, repo string, resource allowlist.ResourceType) int
InvalidateNamespace removes all entries matching the given host, repo, and resource type.
Click to show internal directories.
Click to hide internal directories.