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' else
if @@security.checkSecurity(session[:userName],session[:securityToken],8)==0 @advertiser = Advertiser.find_by_user_id(session[:user_id]) @response_pages, @responses = paginate :responses, :per_page => session[:record] ,:conditions=>["advertiser_id=?",@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