# Caching question

**URL:** <https://www.ruby-forum.com/t/caching-question/175011>\
**Category:** Rails\
**Created:** [September 5, 2009, 7:22pm UTC](https://www.ruby-forum.com/t/caching-question/175011 "2009-09-05T19:22:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RVince](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/4491bb/32.png) [@RVince](https://www.ruby-forum.com/u/RVince)\
**Post date:** [September 5, 2009, 7:22pm UTC](https://www.ruby-forum.com/t/caching-question/175011/1 "2009-09-05T19:22:37Z")

</div>

My inderstand is that when a partial is re-rendered, it is also re-  
executed. So, if I have a select in a partial, say,

select(“channelnotes”, “channelnotes”, Channelnote.find(:all, :order  
=\> ‘tstamp DESC’, :limit =\>3, :conditions =\> [“deleted=0”]).collect {|  
p| [p.note, p.note]}, { :include\_blank =\>  
true , :selected=\>0, :value=\>""}

That when this partial is re-rendered, the data that populates it will  
be pulled from the database anew.

But that is not happening, and I suspect it is a caching issue (either  
on the clilent, or maybe even on the server). Can anyone here confirm  
this? Does anyone know anything about caching in Rails, and, if  
possible, ways to turn it off so that things really DO get re-  
rendered? Thanks, Rvince

---

<div class="post-metadata">

**Author:** ![RVince](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/4491bb/32.png) [@RVince](https://www.ruby-forum.com/u/RVince)\
**Post date:** [September 6, 2009, 8:45pm UTC](https://www.ruby-forum.com/t/caching-question/175011/2 "2009-09-06T20:45:11Z")

</div>

On Sat, Sep 5, 2009 at 10:19 AM, RVince[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> My inderstand is that when a partial is re-rendered, it is also re-  
> executed.

Mine too 🙂

> But that is not happening, and I suspect it is a caching issue

Are you running development or production mode?

–  
Hassan S. ------------------------ removed\_email\_address@domain.invalid  
twitter: @hassan
