image proxy cache life settings


Well-known member
Curious what folks are using for their cache lengths to the proxy. I may type out loud a bit here...

I am using S3 and through various addons for image storage and optimization. Both have costs associated with them.

If i cache a long time, it costs more in s3 for images that may not be viewed again or for a really long time. (1gb storage = $0.023 & 1000 get+put reqs = ~ $0.01)
can reduce 'put' requests by storing longer.
if i re-fetch images, it's a kraken re-optimize call that has a cost, and it is significantly more than s3. (500mb=$5)
If i store forever, without a refresh, the image may go stale.
Odds are if it does go stale, the old image is the better one i want anyway.

I am currently using 20 days and a 5 day refresh.
The admincp proxy log shows: 69,450 items

Hosting more on s3 longer is cheaper.
so i'm thinking about updating my storage time to 1 year.

-> does the cache refresh force an update to the image if it hasn't changed?
---- and if that is true, how will it know it hasn't changed as the source != the optimized image any more, especially with meta stripping from kraken

and if that's the case, the long term storage doesn't matter at all. the refresh value dictates the life of the image and then i should set that value high.
but if i do, and it goes stale, i won't get the new image.
but again, as above, stale images probably mean the 3rd party deleted it so i want to retain the old one any way.

Do i disable the optimizer for proxy images?
that saves initial costs, but not bandwidth from s3 costs. i'm sure the threshold is somewhere around 1000 image views = better roi to optimize it. but you don't know until you know

Last edited:
I don't think the image going stale is a concern at all. I can't think of one instance I'd want a new image replacing the current image at the URL.

I have mine set to unlimited. But it only takes up extra disk space on my server. I also set a 30 day cache time on Cloudflare and 1 year browser cache. I'd do longer on Cloudflare if I could.
Top Bottom