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
}
func NewCacheManager ¶
func NewCacheManager(name, cacheFile string, dumpInterval time.Duration, maxCacheSize int, enableDump bool) (*CacheManager, error)
NewCacheManager creates a new CacheManager instance. It initializes the cache manager with the provided parameters and starts a routine for cache dumping.
func (*CacheManager) Delete ¶
func (cm *CacheManager) Delete(key string)
Delete removes the value associated with the given key from the cache.
func (*CacheManager) Get ¶
func (cm *CacheManager) Get(key string) (interface{}, bool)
Get retrieves the value associated with the given key from the cache.
func (*CacheManager) GetAll ¶
func (cm *CacheManager) GetAll() map[string]interface{}
GetAll returns all the key-value pairs in the cache.
func (*CacheManager) Set ¶
func (cm *CacheManager) Set(key string, value interface{})
Set sets the value associated with the given key in the cache.
func (*CacheManager) StopDump ¶
func (cm *CacheManager) StopDump()
Click to show internal directories.
Click to hide internal directories.