# Dont cache a variable in action

**URL:** <https://www.ruby-forum.com/t/dont-cache-a-variable-in-action/156522>\
**Category:** Rails\
**Created:** [December 29, 2008, 12:25pm UTC](https://www.ruby-forum.com/t/dont-cache-a-variable-in-action/156522 "2008-12-29T12:25:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ankitparekh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d9b06d/32.png) [@ankitparekh](https://www.ruby-forum.com/u/ankitparekh)\
**Post date:** [December 29, 2008, 12:25pm UTC](https://www.ruby-forum.com/t/dont-cache-a-variable-in-action/156522/1 "2008-12-29T12:25:22Z")

</div>

Hi

I m facing a unique problem. I have a method which i m caching through  
caches\_action but in that i have one variable which i dont want to  
cache…

To be specific i m using paging and if i cache the page my pagination  
stops. I m using custom pagination method.

Can ne one tell me how to solve this issue. Is there a way i can make it  
possible not to cache one variable in a method. Sounds odd but I dont  
have ne other option in my mind

Thanks
