re: The Rails Ecosystem is Healthier than Ever VIEW POST

TOP OF THREAD FULL DISCUSSION
re: 😄 A shout-out to ActiveStorage! Rest in peace paperclip, carrierwave and others 💀
 

I love ActiveStorage too, I use it on my personal website and on all new projects at work.
But one major shortcoming I found, and something I hope will be addressed/changed in future versions, is that images cannot be cached by CDNs. I have CloudFront and CloudFlare caching static assets, but I had to exclude images because ActiveStorage generates 5 minutes-lived URLs from the backing service, and after 5 minutes if the cache tries to refresh itself it returns a 404 error.

As you can see in this issue on GitHub, it is a common concern.

 

Yeah I faced the same issue with no success :(
How did you work around it?
Seems like ActiveStorage was planned for files rather than for images :/

Well... I didn't ahah
We're just avoiding caching images, inefficient but at least it works. I hope they'll fix it soon

code of conduct - report abuse