Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheManager ¶
type CacheManager struct {
// contains filtered or unexported fields
}
CacheManager provides TTL-based caching with thread-safety and persistence
func NewCacheManager ¶
func NewCacheManager(path string, config Config) (*CacheManager, error)
NewCacheManager creates a new cache manager with the specified configuration
func (*CacheManager) Clear ¶
func (cm *CacheManager) Clear()
Clear removes all entries from the cache
func (*CacheManager) Close ¶
func (cm *CacheManager) Close() error
Close shuts down the cache manager and saves to disk
func (*CacheManager) Get ¶
func (cm *CacheManager) Get(key string) interface{}
Get retrieves a value from the cache by key
func (*CacheManager) Set ¶
func (cm *CacheManager) Set(key string, value interface{})
Set stores a value in the cache with the given key
func (*CacheManager) Stats ¶
func (cm *CacheManager) Stats() map[string]interface{}
Stats returns cache performance statistics
type CacheStats ¶
CacheStats tracks cache performance metrics
Click to show internal directories.
Click to hide internal directories.