# Rails - ActiveRecord doesn't commit, cache problem?

**URL:** <https://www.ruby-forum.com/t/rails-activerecord-doesnt-commit-cache-problem/140184>\
**Category:** Rails\
**Created:** [June 11, 2008, 6:00pm UTC](https://www.ruby-forum.com/t/rails-activerecord-doesnt-commit-cache-problem/140184 "2008-06-11T18:00:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dicouw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ee59a6/32.png) [@dicouw](https://www.ruby-forum.com/u/dicouw)\
**Post date:** [June 11, 2008, 6:00pm UTC](https://www.ruby-forum.com/t/rails-activerecord-doesnt-commit-cache-problem/140184/1 "2008-06-11T18:00:22Z")

</div>

Hi everybody,

I’m facing a strange problem (bug?) with a rails application.

It’s an standard application that does some inserts, updates, deletes  
etc…

And there is a rake task, like a cron, that check existence or  
inexistence of tables rows.

Anyway,

It’s not the first time i see that, when i insert rows, it’s working.  
When i check it on my mysql client, rows are there.

Then the cron delete these rows, one by one, and it raise an exception  
like “Couldn’t find Room with ID=152”.

But this room exists…

And some times, after some inserts, i type the “select \* from rooms”  
in my sql client, and the table is empty.

So, i think it’s like a cache problem, maybe rails is caching the  
queries and their results and doesn’t commit them, but i’m not sure at  
all.  
And if it is the reason, i don’t know how to solve it,  
This problem is here since I updgrade Rails to 2.1.

Does anyone knows something about that?

Thanks everyone !
