I was trying to use memcache for session storage in Typo. And i got
following error, when user logs into the system.
Session ID:
Cookie set: is_admin=yes; path=/
Redirected to http://foobar.com:8002/admin/content
Completed in 0.02042 (48 reqs/sec) | DB: 0.00236 (11%) | 302 Found
[http://foobar.com/accounts/login]
undefined class/module User
/usr/lib/ruby/gems/1.8/gems/memcache-client-1.0.3/lib/memcache.rb:128:in `get'
/usr/lib/ruby/1.8/thread.rb:135:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/memcache-client-1.0.3/lib/memcache.rb:98:in `get'
/usr/lib/ruby/gems/1.8/gems/memcache-client-1.0.3/lib/memcache.rb:191:in `[]'
/var/www/blogs/kurt_blog/config/../vendor/rails/actionpack/lib/action_controller/session/mem_cache_store.rb:67:in
`restore'
/usr/lib/ruby/1.8/cgi/session.rb:305:in `[]'
/var/www/blogs/kurt_blog/config/../vendor/rails/actionpack/lib/action_controller/cgi_process.rb:113:in
`session'
/var/www/blogs/kurt_blog/config/../vendor/rails/actionpack/lib/action_controller/cgi_process.rb:141:in
`stale_session_check!'
/var/www/blogs/kurt_blog/config/../vendor/rails/actionpack/lib/action_controller/cgi_process.rb:107:in
`session'
/var/www/blogs/kurt_blog/config/../vendor/rails/actionpack/lib/action_controller/base.rb:887:in
`assign_shortcuts_without_flash'
/var/www/blogs/kurt_blog/config/../vendor/rails/actionpack/lib/action_controller/flash.rb:141:in
`assign_shortcuts'
/var/www/blogs/kurt_blog/config/../vendor/rails/actionpack/lib/action_controller/base.rb:375:in
`process_without_filters'
/var/www/blogs/kurt_blog/config/../vendor/rails/actionpack/lib/action_controller/filters.rb:377:in
`process_without_session_management_support'
/var/www/blogs/kurt_blog/config/../vendor/rails/actionpack/lib/action_controller/session_management.rb:117:in
`process'
/var/www/blogs/kurt_blog/config/../vendor/rails/railties/lib/dispatcher.rb:38:in
`dispatch'
This overkill of using memcache for session storage is because, I have
modified typo for hosting multiple blogs. The app works when i switch
to active_record storage.
Also, Users model of typo actually makes connection to one other apps
database, using establish_connection method of activerecord.
But why is this inconsistency.
--
There was only one Road; that it was like a great river: its springs
were at every doorstep, and every path was its tributary.