If you turn on controller caching like this:
config.action_controller.perform_caching = true
it looks like static assets will be written in the Rails.cache with the
url
as the key. If you precompile your assets in production, why is there a
need
to put these assets in Rails.cache too? I could see it being useful if
you
don’t use the asset pipeline I suppose. Is there a way to turn this
behavior
off without turning off all controller caching?
I’m using redis for my cache_store and static assets are actually eating
up
a lot of memory. I’ve also tried this with a file_store and the same
thing
happens, but with disk space instead. It seems a bit redundant though.
I’m
using Cloudflare as my CDN, so Cloudflare will just hit the static asset
once to cache it and never load it up again, so storing assets in
Rails.cache is just eating up ram.