mirror of
https://github.com/willnorris/imageproxy.git
synced 2026-04-29 06:46:23 +02:00
deprecate cacheSize flag and remove docs
this flag was never actually doing what I thought it was in the first place. Also fix up a few instances of cacheDir still be used in config files fixes #45
This commit is contained in:
parent
355a00f7b6
commit
810ecedd69
4 changed files with 11 additions and 12 deletions
|
|
@ -46,7 +46,7 @@ var referrers = flag.String("referrers", "", "comma separated list of allowed re
|
|||
var baseURL = flag.String("baseURL", "", "default base URL for relative remote URLs")
|
||||
var cache = flag.String("cache", "", "location to cache images (see https://github.com/willnorris/imageproxy#cache)")
|
||||
var cacheDir = flag.String("cacheDir", "", "(Deprecated; use 'cache' instead) directory to use for file cache")
|
||||
var cacheSize = flag.Uint64("cacheSize", 100, "maximum size of file cache (in MB)")
|
||||
var cacheSize = flag.Uint64("cacheSize", 0, "Deprecated: this flag does nothing")
|
||||
var signatureKey = flag.String("signatureKey", "", "HMAC key used in calculating request signatures")
|
||||
var scaleUp = flag.Bool("scaleUp", false, "allow images to scale beyond their original dimensions")
|
||||
var version = flag.Bool("version", false, "print version information")
|
||||
|
|
@ -133,8 +133,7 @@ func parseCache() (imageproxy.Cache, error) {
|
|||
|
||||
func diskCache(path string) *diskcache.Cache {
|
||||
d := diskv.New(diskv.Options{
|
||||
BasePath: path,
|
||||
CacheSizeMax: *cacheSize * 1024 * 1024,
|
||||
BasePath: path,
|
||||
|
||||
// For file "c0ffee", store file as "c0/ff/c0ffee"
|
||||
Transform: func(s string) []string { return []string{s[0:2], s[2:4]} },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue