{"modulePath":"github.com/sourcegraph/httpcache","version":"v0.0.0-20160524185540-16db777d8ebe","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package diskcache\n\nPackage diskcache provides an implementation of httpcache.Cache that uses the diskv package to supplement an in-memory map with persistent storage\n\n## Types\n\n```go\ntype Cache struct {\n\t// contains filtered or unexported fields\n}\n```\nCache is an implementation of httpcache.Cache that supplements the in-memory map with persistent storage\n\n```go\nfunc New(basePath string) *Cache\n```\nNew returns a new Cache that will store files in basePath\n\n```go\nfunc NewWithDiskv(d *diskv.Diskv) *Cache\n```\nNewWithDiskv returns a new Cache using the provided Diskv as underlying storage.\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/diskcache","name":"diskcache","synopsis":"Package diskcache provides an implementation of httpcache.Cache that uses the diskv package to supplement an in-memory map with persistent storage","isRedistributable":true}
