# Active Record Query cache not working

**URL:** <https://www.ruby-forum.com/t/active-record-query-cache-not-working/158965>\
**Category:** Rails\
**Created:** [January 29, 2009, 9:53pm UTC](https://www.ruby-forum.com/t/active-record-query-cache-not-working/158965 "2009-01-29T21:53:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![frankmt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/8c91f0/32.png) [@frankmt](https://www.ruby-forum.com/u/frankmt)\
**Post date:** [January 29, 2009, 9:53pm UTC](https://www.ruby-forum.com/t/active-record-query-cache-not-working/158965/1 "2009-01-29T21:53:41Z")

</div>

I have a Rails 2.1 app running on MySQl where the ActiveRecord query  
cache is not working for some specific expensive queries they have, and  
just for those ones, meaning that in  
the same controller action another queries are being correctly cached.

The queries are basically doing a SELECT \* from a table, and so far the  
only specific details for these non-cached queries that we could observe  
are

1. They both return a big chunk of text data
2. The tables they are accessing are in a separate legacy database

About the legacy database, it does not differ that much from the new  
one, both are MySql servers and they run in the same box.

Has anyone of you experienced similar problems?

Thanks!  
Francisco
