Does anyone know the location of the rails image gem dragonfly's cache. I don't want to have to regenerate all the different sized versions of images each time I deploy.

I already keep the original files in shared and symlink them to each deploy, but can't work out where the resized versions are.

有帮助吗?

解决方案

Dragonfly does not store resized images on disk, which is part of its appeal; it generates resized versions of the image on demand. This is very flexible, but it means that you could take a nasty performance hit if you're always serving images from your Rails processes. You should cache them using something like Varnish or a CDN for best performance.

其他提示

Actually Dragonfly does provide a to_file() method so you can definitely cache your images. If you are lazy like me and want to do it the easy way, check out the handy dragonfly_helper

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top