hcfilters

filtering middlewares for https://github.com/gregjones/httpcache

OTHER License

Stars
1
Committers
2

hcfilters

๐Ÿ˜„ filters for github.com/gregjones/httpcache

Usage

$ go get -u moul.io/hcfilters
// before
client := &http.Client{
	Transport: httpcache.NewTransport(
		diskcache.New(diskcachePath),
	),
}

// after
client := &http.Client{
	Transport: httpcache.NewTransport(
		hcfilters.MaxSize( // skip caching results > 2Mb
			diskcache.New(diskcachePath),
			2*1024*1024,
		),
	),
}

License

ยฉ 2020 Manfred Touron

Licensed under the Apache License, Version 2.0 (LICENSE-APACHE) or the MIT license (LICENSE-MIT), at your option. See the COPYRIGHT file for more details.

SPDX-License-Identifier: (Apache-2.0 OR MIT)

Package Rankings
Top 8.17% on Proxy.golang.org
Badges
Extracted from project README
GoDoc License GitHub release Go Report Card CodeFactor codecov GolangCI Sourcegraph Made by Manfred Touron