Cache is an implementation of httpcache.Cache with leveldb storage
type Cache struct {
// contains filtered or unexported fields
}
func New(path string) (*Cache, error)
New returns a new Cache that will store leveldb in path
func NewWithDB(db *leveldb.DB) *Cache
NewWithDB returns a new Cache using the provided leveldb as underlying storage.
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