MCPcopy
hub / github.com/willnorris/imageproxy / diskCache

Function diskCache

caddy/module.go:158–166  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

156}
157
158func diskCache(path string) *diskcache.Cache {
159 d := diskv.New(diskv.Options{
160 BasePath: path,
161
162 // For file "c0ffee", store file as "c0/ff/c0ffee"
163 Transform: func(s string) []string { return []string{s[0:2], s[2:4]} },
164 })
165 return diskcache.NewWithDiskv(d)
166}

Callers 1

parseCacheFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected