package memcache
import "github.com/gregjones/httpcache/memcache"
Package memcache provides an implementation of httpcache.Cache that uses gomemcache to store cached responses.
When built for Google App Engine, this package will provide an implementation that uses App Engine's memcache service. See the appengine.go file in this package for details.
Index ¶
Types ¶
type Cache ¶
Cache is an implementation of httpcache.Cache that caches responses in a memcache server.
func New ¶
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 ¶
NewWithClient returns a new Cache with the given memcache client.
func (*Cache) Delete ¶
Delete removes the response with key from the cache.
func (*Cache) Get ¶
Get returns the response corresponding to key if present.
func (*Cache) Set ¶
Set saves a response to the cache as key.
Source Files ¶
- Version
- v0.0.0-20190611155906-901d90724c79 (latest)
- Published
- Jun 11, 2019
- Platform
- js/wasm
- Imports
- 1 packages
- Last checked
- 1 month ago –
Tools for package owners.