mirror of
https://github.com/willnorris/imageproxy.git
synced 2026-04-25 21:06:24 +02:00
allow overriding cache directives in responses
Add a new `-minCacheDuration` flag to specify a minimum duration to cache images for. Updates #28 Updates #144 Fixes #207 Fixes #208
This commit is contained in:
parent
82ce506905
commit
7502adde1c
6 changed files with 181 additions and 4 deletions
12
README.md
12
README.md
|
|
@ -184,6 +184,18 @@ first check an in-memory cache for an image, followed by a gcs bucket:
|
|||
|
||||
[tiered fashion]: https://godoc.org/github.com/die-net/lrucache/twotier
|
||||
|
||||
#### Cache Duration
|
||||
|
||||
By default, images are cached for the duration specified in response headers.
|
||||
If an image has no cache directives, or an explicit `Cache-Control: no-cache` header,
|
||||
then the response is not cached.
|
||||
|
||||
To override the response cache directives, set a minimum time that response should be cached for.
|
||||
This will ignore `no-cache` and `no-store` directives, and will set `max-age`
|
||||
to the specified value if it is greater than the original `max-age` value.
|
||||
|
||||
imageproxy -cache /tmp/imageproxy -minCacheDuration 5m
|
||||
|
||||
### Allowed Referrer List
|
||||
|
||||
You can limit images to only be accessible for certain hosts in the HTTP
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue