Documentation
¶
Index ¶
- type Manager
- func (m *Manager) Clear(dirPath string) error
- func (m *Manager) GetCacheDir() string
- func (m *Manager) GetFilePath(subpath ...string) string
- func (m *Manager) GetTTL() time.Duration
- func (m *Manager) IsExpired(filePath string) (bool, error)
- func (m *Manager) Load(filePath string, v interface{}) (bool, error)
- func (m *Manager) Remove(filePath string) error
- func (m *Manager) Save(filePath string, v interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles caching operations with TTL support
func NewManager ¶
NewManager creates a new cache manager
func (*Manager) GetCacheDir ¶
GetCacheDir returns the cache directory path
func (*Manager) GetFilePath ¶
GetFilePath builds a cache file path within the cache directory
func (*Manager) IsExpired ¶
IsExpired checks if a file at the given path has expired based on cache TTL
func (*Manager) Load ¶
Load attempts to load data from cache. Returns true if loaded successfully, false if expired/not found
Click to show internal directories.
Click to hide internal directories.