Documentation
¶
Overview ¶
Package cache provides caching utilities for the MCP server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EntryCache ¶
type EntryCache struct {
// contains filtered or unexported fields
}
EntryCache provides thread-safe LRU caching for full SessionEntry objects.
func NewEntryCache ¶
func NewEntryCache(maxItems int) (*EntryCache, error)
NewEntryCache creates a new LRU cache with the specified maximum number of items.
func (*EntryCache) Get ¶
func (c *EntryCache) Get(entryID string) (*client.SessionEntry, bool)
Get retrieves an entry from the cache by its ID. Returns the entry and true if found, nil and false otherwise.
func (*EntryCache) Len ¶
func (c *EntryCache) Len() int
Len returns the current number of items in the cache.
func (*EntryCache) Put ¶
func (c *EntryCache) Put(entryID string, entry *client.SessionEntry)
Put adds or updates an entry in the cache.
Click to show internal directories.
Click to hide internal directories.