mirror of
https://github.com/willnorris/imageproxy.git
synced 2024-12-30 22:34:18 -05:00
95fdd8b79f
includes two implementations, a no-op NopCache and an in-memory MemoryCache.
12 lines
392 B
Go
12 lines
392 B
Go
package cache
|
|
|
|
import "github.com/willnorris/go-imageproxy/data"
|
|
|
|
// NopCache provides a no-op cache implementation that doesn't actually cache anything.
|
|
var NopCache = new(nopCache)
|
|
|
|
type nopCache struct{}
|
|
|
|
func (c nopCache) Get(u string) (*data.Image, bool) { return nil, false }
|
|
func (c nopCache) Save(image *data.Image) {}
|
|
func (c nopCache) Delete(u string) {}
|