func NewCachingSingleHostReverseProxy(target *url.URL, cache httpcache.Cache) *httputil.ReverseProxy {
	proxy := NewSingleHostReverseProxy(target)
	if cache == nil {
		cache = httpcache.NewMemoryCache()
	}
	proxy.Transport = httpcache.NewTransport(cache)
	return proxy
}
NewCachingSingleHostReverseProxy constructs a caching reverse proxy handler for
target. If cache is nil, a volatile, in-memory cache is used.
package apiproxy
import (
	"github.com/sourcegraph/httpcache"
	"net/http"
	"net/http/httputil"
	"net/url"
)