Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultCacheDir = "noxdir"
DefaultCacheDir defines a default folder name that will store cache files.
Variables ¶
View Source
var ErrNoCache = errors.New("cache entry not found")
ErrNoCache defines an error that may occur if the requested cache entry was not found.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache provides a file cache API. It saves and restores an arbitrary data types which can marshaled/unmarshalled as JSON into file cache. The cache entries can be restored by the corresponding key. The cache files will be stored at configured path or default DefaultCachePath will be used.
Click to show internal directories.
Click to hide internal directories.