(path string)
| 211 | } |
| 212 | |
| 213 | func diskCache(path string) *diskcache.Cache { |
| 214 | d := diskv.New(diskv.Options{ |
| 215 | BasePath: path, |
| 216 | |
| 217 | // For file "c0ffee", store file as "c0/ff/c0ffee" |
| 218 | Transform: func(s string) []string { return []string{s[0:2], s[2:4]} }, |
| 219 | }) |
| 220 | return diskcache.NewWithDiskv(d) |
| 221 | } |