Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ExpiredErr = errors.New("Data expired")
)
Functions ¶
This section is empty.
Types ¶
type BookCacher ¶
type BookCacher interface { // init cache Init() error // get from cache by name // if data get but expired will return ExpireErr GetIfExists(name string, expireTime time.Time) ([]byte, error) // save data to cache Save(name string, data []byte) error }
func NewDiskCache ¶
func NewDiskCache(cacheDir string) BookCacher
type DiskCache ¶
type DiskCache struct {
// contains filtered or unexported fields
}
func (*DiskCache) GetIfExists ¶
Click to show internal directories.
Click to hide internal directories.