Cache.get 'reponses' return nil help! help!

Hi all,

I want to cache some objects (models) in memcache, it stores the data
successfully using (Cache.put statement) but while retriving the stored
data from memory using (Cache.get statement) it return nil value. It
goes something like this…

if Cache.get ‘responses’!=nil
@responses=Cache.get ‘responses’
@responses_pages=Cache.get ‘response_pages’
@advertiser=Cache.get ‘advertiser’


@advertiser = Advertiser.find_by_user_id(session[:user_id])
@response_pages, @responses = paginate :responses, :per_page =>
session[:record] ,:conditions=>[“advertiser_id=?”,]
,:order=>‘id desc’
Cache.put ‘responses’, @responses
Cache.put ‘response_pages’, @responses_pages
Cache.put ‘advertiser’, @advertiser

Any suggestion will be appreciated!
Thanks in advance

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs