urlcache

package
v0.0.0-...-a31eaf1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 23, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheStore

type CacheStore struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewCacheStore

func NewCacheStore() *CacheStore

func (*CacheStore) Del

func (c *CacheStore) Del(key string)

func (*CacheStore) Get

func (c *CacheStore) Get(key string) (*URLCache, bool)

func (*CacheStore) Set

func (c *CacheStore) Set(key string, value *URLCache)

type URLCache

type URLCache struct {
	LastModified string
	Etag         string
	CacheControl *cachecontrol.CacheControl
	MD5          string
}

func NewURLCache

func NewURLCache(res *http.Response, body *bytes.Buffer) (*URLCache, string)

func (*URLCache) ApplyRequest

func (c *URLCache) ApplyRequest(req *http.Request)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL