Share session between rails2.* and rails3 with memcache

17 views
Skip to first unread message

邰健聪

unread,
Jan 3, 2011, 6:12:13 AM1/3/11
to chengdu...@googlegroups.com
rails3 app:
session_store.rb:
module ActionController
 module Flash
   module FlashHash < Hash
     def method_missing(m, *a, &b);end
   end
 end
end
SESSION_MEM=MemCache.new({
 …...
:name_space=":session:#{your_name_space}"
})
YourApp::Application.config.session_store :mem_cache_store,:key => ,:domain=>,:secret =>,:cache => SESSION_MEM

李华顺

unread,
Jan 3, 2011, 6:21:40 AM1/3/11
to chengdu...@googlegroups.com
嗯,好办法!

发自我的 iPad

在 2011-1-3,下午7:12,"邰健聪" <tai...@gmail.com> 写到:

--
成都 Ruby on Rails 邮件列表:
发贴请Email至:chengdu...@googlegroups.com
https://groups.google.com/group/chengduonrails?hl=zh-CN

邰健聪

unread,
Jan 3, 2011, 6:33:46 AM1/3/11
to chengdu...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages