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

Interface Cache

cache.go:8–17  ·  view source on GitHub ↗

The Cache interface defines a cache for storing arbitrary data. The interface is designed to align with httpcache.Cache.

Source from the content-addressed store, hash-verified

6// The Cache interface defines a cache for storing arbitrary data. The
7// interface is designed to align with httpcache.Cache.
8type Cache interface {
9 // Get retrieves the cached data for the provided key.
10 Get(key string) (data []byte, ok bool)
11
12 // Set caches the provided data.
13 Set(key string, data []byte)
14
15 // Delete deletes the cached data at the specified key.
16 Delete(key string)
17}
18
19// NopCache provides a no-op cache implementation that doesn't actually cache anything.
20var NopCache = new(nopCache)

Callers 17

exifOrientationFunction · 0.65
updateCacheHeadersMethod · 0.65
serveImageMethod · 0.65
referrerMatchesFunction · 0.65
should304Function · 0.65
RoundTripMethod · 0.65
TestAllowedFunction · 0.65
TestReferrerMatchesFunction · 0.65
newImageFunction · 0.65
updateCacheHeadersMethod · 0.65

Implementers 3

nopCachecache.go
cacheinternal/gcscache/gcscache.go
cacheinternal/s3cache/s3cache.go

Calls

no outgoing calls

Tested by

no test coverage detected