0
Fork 0
mirror of https://github.com/willnorris/imageproxy.git synced 2024-12-16 21:56:43 -05:00

sort cache select cases

This commit is contained in:
Will Norris 2017-09-17 11:11:00 +00:00
parent a4304294da
commit db55cb60f8

View file

@ -111,18 +111,18 @@ func parseCache() (imageproxy.Cache, error) {
}
switch u.Scheme {
case "s3":
return s3cache.New(u.String())
case "gcs":
return gcscache.New(u.String()), nil
case "azure":
return azurestoragecache.New("", "", u.Host)
case "gcs":
return gcscache.New(u.String()), nil
case "redis":
conn, err := redis.DialURL(u.String(), redis.DialPassword(os.Getenv("REDIS_PASSWORD")))
if err != nil {
return nil, err
}
return rediscache.NewWithClient(conn), nil
case "s3":
return s3cache.New(u.String())
case "file":
fallthrough
default: