Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultCacheMaxSize = 1000
DefaultCacheMaxSize defines the maximum number of entries the cache can hold.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) ComputeKey ¶
ComputeKey generates a cache key based on user impersonation and an optional session auth token.
func (*Cache) Get ¶
Get retrieves the home database for a given user, if it exists. It updates the `lastUsed` timestamp for the entry.
func (*Cache) Set ¶
Set adds or updates an entry in the cache. If the cache exceeds its max size, it prunes the least recently used entries.
func (*Cache) SetEnabled ¶
SetEnabled enables or disables the cache.
Click to show internal directories.
Click to hide internal directories.