The -cache flag can be specified multiple times to create a tier of
caches. Typically this would be used to be put a small in-memory cache
in front of a slower on-disk cache.
Fixes#111
This uses the official Go SDK from Amazon, which supports the newer v4
authentication method. Fixes#74. Doing so also required adding a new
s3cache package which uses the official SDK.
THIS IS A BREAKING CHANGE for anyone that uses s3, since the syntax of
the command line flag is now different. This is unfortunately necessary
because aws-sdk-go always requires the region to be explicitly declared,
which wasn't always the case with the previous format. This breaking
change is unfortunate, but given that the other s3 package hasn't seen
updates in years, and so many new S3 regions only support the newer v4
authentication method, it's necessary.
values between 0 and 1 have the same behavior as the size option - it is
treated as a percentage of the original image size. Negative values for
cx and cy are calculated from the bottom and right edges of the image.
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
The imageproxy command no longer uses the in-memory cache by default.
Instead, no caching is enabled by default and the in-memory cache can be
enabled by passing `-cache memory`.
The -cache flag also supports specifying directories, and therefore
replaces hte older -cacheDir flag. cacheDir is still supported for
compatibility, but is deprecated and will be removed in the future.
This also sets us up to add support for additional caching backends in
the future.
Partial fix for #49.
Installing the server should be as simple as `go get`, and running it should be as simple as executing the compiled binary. The previous option was a bit round-about.
GitHub uses their own image proxy (camo), which the example images were
linking to. Switch to an explicit link, so that the full exmaple URL
can be seen.