using s3 as caching store

This commit is contained in:
Victor Trac 2015-06-28 23:13:57 -05:00 committed by Will Norris
parent f67209437a
commit ec96fcbc90
2 changed files with 8 additions and 0 deletions

View file

@ -27,6 +27,7 @@ import (
"github.com/gregjones/httpcache"
"github.com/gregjones/httpcache/diskcache"
"github.com/peterbourgon/diskv"
"sourcegraph.com/sourcegraph/s3cache"
"willnorris.com/go/imageproxy"
)
@ -120,6 +121,9 @@ func parseCache() (imageproxy.Cache, error) {
}
switch u.Scheme {
case "s3":
u.Scheme = "https"
return s3cache.New(u.String()), nil
case "file":
fallthrough
default: