MCPcopy Index your code
hub / github.com/perkeep/perkeep / cacheKey

Function cacheKey

pkg/server/image.go:171–173  ·  view source on GitHub ↗

Key format: "scaled:" + bref + ":" + width "x" + height where bref is the blobref of the unscaled image.

(bref string, width int, height int)

Source from the content-addressed store, hash-verified

169// Key format: "scaled:" + bref + ":" + width "x" + height
170// where bref is the blobref of the unscaled image.
171func cacheKey(bref string, width int, height int) string {
172 return fmt.Sprintf("scaled:%v:%dx%d:tv%v", bref, width, height, images.ThumbnailVersion())
173}
174
175// ScaledCached reads the scaled version of the image in file,
176// if it is in cache and writes it to buf.

Callers 2

scaledCachedMethod · 0.85
ServeHTTPMethod · 0.85

Calls 1

ThumbnailVersionFunction · 0.92

Tested by

no test coverage detected