# Action Caching - Where'd the files go?

**URL:** <https://www.ruby-forum.com/t/action-caching-whered-the-files-go/81627>\
**Category:** Rails\
**Created:** [January 10, 2007, 8:16pm UTC](https://www.ruby-forum.com/t/action-caching-whered-the-files-go/81627 "2007-01-10T20:16:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Caleb\_Jones](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/bcef8e/32.png) [@Caleb\_Jones](https://www.ruby-forum.com/u/Caleb_Jones)\
**Post date:** [January 10, 2007, 8:16pm UTC](https://www.ruby-forum.com/t/action-caching-whered-the-files-go/81627/1 "2007-01-10T20:16:55Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Caleb\_Jones](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/bcef8e/32.png) [@Caleb\_Jones](https://www.ruby-forum.com/u/Caleb_Jones)\
**Post date:** [January 12, 2007, 6:32pm UTC](https://www.ruby-forum.com/t/action-caching-whered-the-files-go/81627/2 "2007-01-12T18:32:14Z")

</div>

Anyone have any insight on this?

---

<div class="post-metadata">

**Author:** ![Caleb\_Jones](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/bcef8e/32.png) [@Caleb\_Jones](https://www.ruby-forum.com/u/Caleb_Jones)\
**Post date:** [January 12, 2007, 9:45pm UTC](https://www.ruby-forum.com/t/action-caching-whered-the-files-go/81627/3 "2007-01-12T21:45:37Z")

</div>

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 S.

> **[Ruby on Rails hosting companies - Compare, review and find your next ROR host](https://railshostinginfo.com)**
>
> Are you looking for a good and reliable Ruby on Rails hosting company? We have lined them up so you can easily compare and review them.

Compare and review Rails hosting plans

---

<div class="post-metadata">

**Author:** ![Caleb\_Jones](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/bcef8e/32.png) [@Caleb\_Jones](https://www.ruby-forum.com/u/Caleb_Jones)\
**Post date:** [January 19, 2007, 4:29pm UTC](https://www.ruby-forum.com/t/action-caching-whered-the-files-go/81627/4 "2007-01-19T16:29:09Z")

</div>

As far as I know, action caches go to memory and are cleared by a server  
restart. Anyone else know different?

Cody S.-2 wrote:

> 

–  
View this message in context:  
[http://www.nabble.com/-Rails--Action-Caching---Where'd-the-files-go--tf2954607.html#a8303044](http://www.nabble.com/-Rails--Action-Caching---Where%27d-the-files-go--tf2954607.html#a8303044)  
Sent from the RubyOnRails Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![Caleb\_Jones](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/bcef8e/32.png) [@Caleb\_Jones](https://www.ruby-forum.com/u/Caleb_Jones)\
**Post date:** [January 19, 2007, 4:29pm UTC](https://www.ruby-forum.com/t/action-caching-whered-the-files-go/81627/5 "2007-01-19T16:29:17Z")

</div>

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”
