Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdapterInterface ¶
type AdapterInterface interface { // Set cache with key Set(key string, value string) error // Get cache by key Get(key string) (string, error) // IsValid check if cache is valid IsValid(key string) bool // ClearPrefix clear cache by key Clear(key string) error // ClearPrefix clear cache by key prefix ClearPrefix(keyPrefix string) error // Clear all cache ClearAll() error }
AdapterInterface interface
func NewDiskCache ¶
func NewDiskCache(config DiskCacheConfig) *AdapterInterface
NewDiskCache store cache to file on disk
func NewInMemoryCache ¶
func NewInMemoryCache(config InMemoryCacheConfig) *AdapterInterface
NewInMemoryCache new instance of inMemoryCache
type DiskCacheConfig ¶
DiskCacheConfig struct
type InMemoryCacheConfig ¶
InMemoryCacheConfig struct
Click to show internal directories.
Click to hide internal directories.