Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryCache ¶
type MemoryCache struct {
// contains filtered or unexported fields
}
MemoryCache is an in-memory cache implementation
func (*MemoryCache) Delete ¶
func (c *MemoryCache) Delete(key string)
Delete removes a value from the cache
func (*MemoryCache) Get ¶
func (c *MemoryCache) Get(key string) (interface{}, bool)
Get retrieves a cached value
func (*MemoryCache) Set ¶
func (c *MemoryCache) Set(key string, value interface{}, ttl time.Duration)
Set stores a value in the cache
func (*MemoryCache) Size ¶
func (c *MemoryCache) Size() int
Size returns the number of items in the cache
Click to show internal directories.
Click to hide internal directories.