mirror of
https://github.com/willnorris/imageproxy.git
synced 2026-05-03 08:42:40 +02:00
rely on httpcache for response caching
This commit is contained in:
parent
b9584c18cb
commit
73f6357cda
5 changed files with 43 additions and 119 deletions
|
|
@ -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 != "" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue