4 "github.com/Kovensky/go-fscache"
11 c, err := fscache.NewCacheDir(path.Join(os.TempDir(), "anidb", "cache"))
20 var Cache fscache.CacheDir
22 type cacheable interface {
23 setCachedTS(time.Time)
26 func CacheSet(v interface{}, key ...fscache.CacheKey) (err error) {
28 _, err = Cache.Set(v, key...)
32 switch t := v.(type) {
39 func CacheGet(v interface{}, key ...fscache.CacheKey) (err error) {
40 ts, err := Cache.Get(v, key...)
44 switch t := v.(type) {