I have a rails app. that does both page and action caching. In my development environment this works flawlessly. However, when I deploy to my server, the action cache files do not appear in the tmp/cache/SERVER_NAME/CONTROLLER/ACTION directories. I also checked the system level /tmp directory and do not see the files there. What's weird is that the logs indicate that action caching is working (filter chains are halting and the code is not executed). My worry is that it somehow defaulted back to some sort of memory caching mechanism (which would be bad as there is a potential for a lot of action cache files). Does anyone know of alternative fall-backs or settings that would cause Rails to place the action cache files somewhere other than in the tmp/cache/SERVER_NAME/CONTROLLER/ACTION directory?
on 2007-01-10 20:16
on 2007-01-12 18:32
Anyone have any insight on this?
on 2007-01-12 21:45
Hi Caleb, which webserver are you using? It could have something to do with the fact that the webserver doesn't have the rights to write into tmp/cache/SERVER_NAME/CONTROLLER/ACTION. Check the rights of the tmp/cache folder and check the logs of your webserver. Let me know if it works out. Kind regards, Nick Snels - http://railshostinginfo.com Compare and review Rails hosting plans
on 2007-01-19 16:29
As far as I know, action caches go to memory and are cleared by a server restart. Anyone else know different? Cody Skidmore-2 wrote: > -- View this message in context: http://www.nabble.com/-Rails--Action-Caching---Whe... Sent from the RubyOnRails Users mailing list archive at Nabble.com.
on 2007-01-19 16:29
Different versions of Rails have different default locations for the Action Cache. If your production server is using an older Rails Gem, then the action cache could be stored in memory. Newer Rails versions use the RAILS_ROOT/tmp/cache directory by default. I don't know when this changed. You can configure to use the File system instead of using the default location in environment.rb: ActionController::Base.fragment_cache_store = :file_store, "/path/to/cache/directory"