mirror of
https://github.com/willnorris/imageproxy.git
synced 2026-04-29 06:46:23 +02:00
using s3 as caching store
This commit is contained in:
parent
f67209437a
commit
ec96fcbc90
2 changed files with 8 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue