# Acts\_as\_cached missing

**URL:** <https://www.ruby-forum.com/t/acts-as-cached-missing/132542>\
**Category:** Rails\
**Created:** [March 21, 2008, 7:25am UTC](https://www.ruby-forum.com/t/acts-as-cached-missing/132542 "2008-03-21T07:25:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![grayson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/c77e96/32.png) [@grayson](https://www.ruby-forum.com/u/grayson)\
**Post date:** [March 21, 2008, 7:25am UTC](https://www.ruby-forum.com/t/acts-as-cached-missing/132542/1 "2008-03-21T07:25:50Z")

</div>

I can’t seem to be able to get a very basic cache working on my user  
model. I have the following in the user model

class User \< ActiveRecord::Base  
acts\_as\_cached :include =\> [:user\_videos, :user\_images, :user\_interests,  
:user\_attributes]  
…

than in the user\_controller I have

@user = User.get\_cache(params[:id])

so far so good, right? if I run memcached -vv in interactive mode this  
is what I see. The first hit, stores and the second one just serves up.

\<1840 set app-development:User:6654 0 1800 2845

> 1840 STORED  
> \<1840 get app-development:User:6654  
> 1840 sending key app-development:User:6654  
> 1840 END

But in both the development.log and the mysql query log, I see database  
calls being made (every time, not just the first time) against user,  
user\_videos, user\_images, etc.

Thanks.
