diff --git a/cmd/imageproxy/main.go b/cmd/imageproxy/main.go index 14fa7cc..ac7be3a 100644 --- a/cmd/imageproxy/main.go +++ b/cmd/imageproxy/main.go @@ -135,6 +135,9 @@ func diskCache(path string) *diskcache.Cache { d := diskv.New(diskv.Options{ BasePath: path, CacheSizeMax: *cacheSize * 1024 * 1024, + + // For file "c0ffee", store file as "c0/ff/c0ffee" + Transform: func(s string) []string { return []string{s[0:2], s[2:4]} }, }) return diskcache.NewWithDiskv(d) }