MCPcopy Index your code
hub / github.com/willnorris/imageproxy / diskCache

Function diskCache

cmd/imageproxy/main.go:213–221  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

211}
212
213func 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}

Callers 1

parseCacheFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected