Seems to not be working in that there is no error, but my Rails app is
not keeping track of any session. Fragment cache is working, however. I
have tried many different ways, but just can''t get this to work. My
memcached-vv also looks normal. Can someone please help me, or tell me
where to start looking.
evironment.rb:
require File.join(File.dirname(__FILE__), ''boot'')
require_gem ''memcache-client''
memcache_options = {
:compression => false,
:debug => false,
:namespace => ''domain'',
:readonly => false,
:urlencode => false
}
memcache_servers = "localhost:11211"
Rails::Initializer.run do |config|
config.action_controller.session_store = :mem_cache_store
config.action_controller.fragment_cache_store = :mem_cache_store,
memcache_servers, memcache_options
#config.action_controller.fragment_cache_store = CACHE, {}
#ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.merge!({
''cache'' => CACHE })
require ''hodel_3000_compliant_logger''
config.logger = Hodel3000CompliantLogger.new(config.log_path)
end
cache_params = *([memcache_servers, memcache_options].flatten)
CACHE = MemCache.new *cache_params
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.merge!({
''cache''
=> CACHE })
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.server_settings = {
:address => "mail.domain.com",
:port => 25,
:domain => "domain.com",
}
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.raise_delivery_errors = true
ActionMailer::Base.default_charset = "utf-8"
require ''RMagick''
include Magick
require ''cgi''
require ''cached_model''
require ''misc''
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Sharkie Landshark
2007-Jul-11 16:22 UTC
Re: :mem_cache_store and memcache-client for session
I am suspecting that my session breaks when I place a model into the session. Example: session[:user] = @user where @user is a Rails model. Is this to be expected? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---