Documentation
¶
Index ¶
- type CacheStats
- type UserCache
- func (c *UserCache) Clear()
- func (c *UserCache) Delete(realm, email string)
- func (c *UserCache) Get(realm, email string) *graph.User
- func (c *UserCache) GetMany(realm string, emails []string) (map[string]*graph.User, []string)
- func (c *UserCache) Set(realm, email string, user *graph.User)
- func (c *UserCache) SetMany(realm string, users map[string]*graph.User)
- func (c *UserCache) Size() int
- func (c *UserCache) Stats() CacheStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheStats ¶
type CacheStats struct {
Total int
Active int
Expired int
TTL time.Duration
Hits uint64
Misses uint64
}
CacheStats represents cache statistics
type UserCache ¶
type UserCache struct {
// contains filtered or unexported fields
}
UserCache provides in-memory caching for user data with TTL support
func NewUserCache ¶
NewUserCache creates a new user cache with the specified TTL
func (*UserCache) Get ¶
Get retrieves a user from cache by realm and email Returns nil if not found or expired
func (*UserCache) GetMany ¶
GetMany retrieves multiple users from cache by realm and emails Returns a map of found users and a slice of missing emails
Click to show internal directories.
Click to hide internal directories.