package diskcache
import "github.com/gregjones/httpcache/diskcache"
Package diskcache provides an implementation of httpcache.Cache that uses the diskv package to supplement an in-memory map with persistent storage
Index ¶
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is an implementation of httpcache.Cache that supplements the in-memory map with persistent storage
func New ¶
New returns a new Cache that will store files in basePath
func NewWithDiskv ¶
NewWithDiskv returns a new Cache using the provided Diskv as underlying storage.
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
- 5 packages
- Last checked
- 1 month ago –
Tools for package owners.