ruby on rails - Rack session key too long for memcached -


I'm running Configure Rail 3 to use memcached for session collection. I have the following setup:

development.rb

config.cache_store =: mem_cache_store

session_store.rb

Foo :: application.config.session_store: mem_cache_store ,: key = & gt; '_foo_session'

I can fix the app, when I go to any page, I get the following error:

ArgumentError Long "rack: session: __ literally _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _): I know the limit of the memcached key is 255. How can I get it, or am I doing something wrong

You are almost certainly looking into this because you switch from cookie store to a memcatch Are you There is still the old session cookie in the browser, with long ID you need to delete this cookie from your browser and the problem will be solved.

If you are switching from a cookie store to a production spot in a memorycat It will be a problem because you do not have control over your user's browser, you probably have to change the session key to avoid problems in this case.


Comments