Documentation
¶
Overview ¶
Package cache implements a simple file-based cache.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
A Cache is a directory holding cached data.
func Create ¶
Create returns a cache using the named subdirectory of the user's cache directory. For example, on macOS, Create("myprog") uses $HOME/Library/Caches/myprog. Create creates the directory if it does not already exist.
func Disabled ¶
func Disabled() *Cache
Disabled returns a Cache that is always empty. Reads always return no result, and writes succeed but are discarded.
Click to show internal directories.
Click to hide internal directories.