switch to use internal gcscache

This commit is contained in:
Will Norris 2018-02-02 10:05:56 +00:00
parent 7bf3645c10
commit 0c20cbe5b5
2 changed files with 6 additions and 4 deletions

View file

@ -30,12 +30,12 @@ import (
"github.com/PaulARoy/azurestoragecache"
"github.com/die-net/lrucache"
"github.com/die-net/lrucache/twotier"
"github.com/diegomarangoni/gcscache"
"github.com/garyburd/redigo/redis"
"github.com/gregjones/httpcache/diskcache"
rediscache "github.com/gregjones/httpcache/redis"
"github.com/peterbourgon/diskv"
"willnorris.com/go/imageproxy"
"willnorris.com/go/imageproxy/internal/gcscache"
"willnorris.com/go/imageproxy/internal/s3cache"
)
@ -142,7 +142,7 @@ func parseCache(c string) (imageproxy.Cache, error) {
case "azure":
return azurestoragecache.New("", "", u.Host)
case "gcs":
return gcscache.New(u.String()), nil
return gcscache.New(u.Host, strings.TrimPrefix(u.Path, "/"))
case "memory":
return lruCache(u.Opaque)
case "redis":