# Rails.cache.fetch("Survey.all") {Survey.all} | Problem only Hash returned, not objects,... nil.incl

**URL:** <https://www.ruby-forum.com/t/rails-cache-fetch-survey-all-survey-all-problem-only-hash-returned-not-objects-nil-incl/168834>\
**Category:** Rails\
**Created:** [May 26, 2009, 3:15pm UTC](https://www.ruby-forum.com/t/rails-cache-fetch-survey-all-survey-all-problem-only-hash-returned-not-objects-nil-incl/168834 "2009-05-26T15:15:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rafael](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/4da419/32.png) [@rafael](https://www.ruby-forum.com/u/rafael)\
**Post date:** [May 26, 2009, 3:15pm UTC](https://www.ruby-forum.com/t/rails-cache-fetch-survey-all-survey-all-problem-only-hash-returned-not-objects-nil-incl/168834/1 "2009-05-26T15:15:40Z")

</div>

Hello,

does anybody know, how to get objects from the returned Custom Cache?  
Actually, everything comes back, but is only a Hash, it seems…

#\<Survey id: 11, uid: “006CC623A9B”, targeted: “for\_me”, name:  
“ohjlj”, description: “

kjopo

”, startdate: “2009-05-30”,  
enddate: “2009-05-31”, status: “building”, created\_at: “2009-05-24  
21:23:30”, updated\_at: “2009-05-24 21:23:30”\>

> > @surveys.first.is\_a? Survey  
> > false

Can anyone help me out here?

Greetings

Rafael
