# Action Caching in Rails?

**URL:** <https://www.ruby-forum.com/t/action-caching-in-rails/161067>\
**Category:** Rails\
**Created:** [February 23, 2009, 4:44am UTC](https://www.ruby-forum.com/t/action-caching-in-rails/161067 "2009-02-23T04:44:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![martin\_mercy2001](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d2c977/32.png) [@martin\_mercy2001](https://www.ruby-forum.com/u/martin_mercy2001)\
**Post date:** [February 23, 2009, 4:44am UTC](https://www.ruby-forum.com/t/action-caching-in-rails/161067/1 "2009-02-23T04:44:55Z")

</div>

Dear all,

I have created a rails application which has menus, like companies,  
users, departments, banners etc. When i click on my menu(I have used  
link\_to\_remote) i have rendered the corresponding pages without changing  
the layouts. I have fully used ajax concepts for all navigations.

For listing companies and users, i need to use action caching but when  
ajax request in passed action caching was not performed. It works fine  
when the requesxt is just post(like while using link\_to).

So could any one please suggest on above issue how to handle action  
caching when the request is a ajax request.?

Thanks in advance

Regards,  
Jose Martin

---

<div class="post-metadata">

**Author:** ![martin\_mercy2001](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d2c977/32.png) [@martin\_mercy2001](https://www.ruby-forum.com/u/martin_mercy2001)\
**Post date:** [February 23, 2009, 3:35pm UTC](https://www.ruby-forum.com/t/action-caching-in-rails/161067/2 "2009-02-23T15:35:00Z")

</div>

You might want to check out fragment caching where you can take more  
control over what fragments are expired when…

Action caching mixed with Ajax might be your issue, although I haven’t  
experimented with that mix. I used fragment\_caching long before I  
started Ajax-ifying (is that even a word?) my app.
