{"modulePath":"github.com/sourcegraph/httpcache","version":"v0.0.0-20160524185540-16db777d8ebe","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package memcache\n\nPackage memcache provides an implementation of httpcache.Cache that uses gomemcache to store cached responses.\n\nWhen 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.\n\n## Types\n\n```go\ntype Cache struct {\n\t*memcache.Client\n}\n```\nCache is an implementation of httpcache.Cache that caches responses in a memcache server.\n\n```go\nfunc New(server ...string) *Cache\n```\nNew 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.\n\n```go\nfunc NewWithClient(client *memcache.Client) *Cache\n```\nNewWithClient returns a new Cache with the given memcache client.\n\n```go\nfunc (c *Cache) Delete(key string)\n```\nDelete removes the response with key from the cache.\n\n```go\nfunc (c *Cache) Get(key string) (resp []byte, ok bool)\n```\nGet returns the response corresponding to key if present.\n\n```go\nfunc (c *Cache) Set(key string, resp []byte)\n```\nSet saves a response to the cache as key.\n\n","path":"github.com/sourcegraph/httpcache/memcache","name":"memcache","synopsis":"Package memcache provides an implementation of httpcache.Cache that uses gomemcache to store cached responses.","isRedistributable":true}
