# Cache Classes problem

**URL:** <https://www.ruby-forum.com/t/cache-classes-problem/155934>\
**Category:** Rails\
**Created:** [December 18, 2008, 10:19am UTC](https://www.ruby-forum.com/t/cache-classes-problem/155934 "2008-12-18T10:19:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sigma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/dec6dc/32.png) [@sigma](https://www.ruby-forum.com/u/sigma)\
**Post date:** [December 18, 2008, 10:19am UTC](https://www.ruby-forum.com/t/cache-classes-problem/155934/1 "2008-12-18T10:19:43Z")

</div>

Hi all

I’ve got a problem with the “cache classes” option in Rails.  
(config.cache\_classes = true)  
When I turn it on, some objects are not reloaded during a long time.

For example:  
If i load something from database with a datetime in the condition  
(created\_at \> 1.minutes.ago), the item will be desplayed much longer  
than just for this minute…

I’m using rails 2.2 with a passenger server.

Has someone an idea what could be wrong?

Regards  
sigma

---

<div class="post-metadata">

**Author:** ![sigma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/dec6dc/32.png) [@sigma](https://www.ruby-forum.com/u/sigma)\
**Post date:** [December 18, 2008, 11:01am UTC](https://www.ruby-forum.com/t/cache-classes-problem/155934/2 "2008-12-18T11:01:56Z")

</div>

On 18 Dec 2008, at 09:18, sigma wrote:

> than just for this minute…
> 
> I’m using rails 2.2 with a passenger server.
> 
> Has someone an idea what could be wrong?

Is it this:

> **[Do you know when your code runs? - Space Vatican](https://www.spacevatican.org/2008/11/9/do-you-know-when-your-code-runs/)**
>
> Few things are more head bashing inducing than code that passes all unit tests, runs perfectly on your development machine but fails on your staging/ …

?

Fred

---

<div class="post-metadata">

**Author:** ![sigma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/dec6dc/32.png) [@sigma](https://www.ruby-forum.com/u/sigma)\
**Post date:** [December 18, 2008, 1:05pm UTC](https://www.ruby-forum.com/t/cache-classes-problem/155934/3 "2008-12-18T13:05:47Z")

</div>

Hey thank you!  
I think that’s it!

On 18 Dez., 11:01, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
