Cache is an implementation of httpcache.Cache that caches responses in a memcache server.
type Cache struct { *memcache.Client }
func New(server ...string) *Cache
New returns a new Cache using the provided memcache server(s) with equal weight. If a server is listed multiple times, it gets a proportional amount of weight.
func NewWithClient(client *memcache.Client) *Cache
NewWithClient returns a new Cache with the given memcache client.
func (c *Cache) Delete(key string)
Delete removes the response with key from the cache.
func (c *Cache) Get(key string) (resp []byte, ok bool)
Get returns the response corresponding to key if present.
func (c *Cache) Set(key string, resp []byte)
Set saves a response to the cache as key.