rely on httpcache for response caching

This commit is contained in:
Will Norris 2013-12-25 18:48:10 -08:00
parent b9584c18cb
commit 73f6357cda
5 changed files with 43 additions and 119 deletions

View file

@ -21,7 +21,7 @@ import (
"net/http"
"strings"
"github.com/willnorris/go-imageproxy/cache"
"github.com/gregjones/httpcache"
"github.com/willnorris/go-imageproxy/proxy"
)
@ -33,8 +33,8 @@ func main() {
fmt.Printf("go-imageproxy listening on %s\n", *addr)
p := proxy.NewProxy(nil)
p.Cache = cache.NewMemoryCache()
c := httpcache.NewMemoryCache()
p := proxy.NewProxy(nil, c)
p.MaxWidth = 2000
p.MaxHeight = 2000
if *whitelist != "" {