httpforcecache

package module
v0.0.0-...-4552b2c Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2016 License: MIT Imports: 3 Imported by: 0

README

httpforcecache

Build Status

A Transport for Go's http.Client that will cache responses. If request is success, cache it. else, do not caching. Based on httpcache.

Cache backends

see heepcache Cache backends

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Transport

type Transport struct {
	Transport http.RoundTripper
	Cache     httpcache.Cache
}

func NewMemoryCacheTransport

func NewMemoryCacheTransport() *Transport

func NewTransport

func NewTransport(c httpcache.Cache) *Transport

func (*Transport) DeleteCache

func (t *Transport) DeleteCache(req *http.Request)

func (*Transport) RoundTrip

func (t *Transport) RoundTrip(req *http.Request) (resp *http.Response, err error)

Jump to

Keyboard shortcuts

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