rails 4 use memcached as session store using dalli

Viewed 6367

I am not able to use memcached as session store with rails 4 using dalli gem.

Here's what I have done.

I added dalli gem to Gemfile

gem 'dalli'

I added the following line in config/initializers/session_store.rb

Rails.application.config.session_store ActionDispatch::Session::CacheStore, :expire_after => 20.minutes

And I added the following line in development.rb

config.cache_store = :dalli_store

Now when I start my development server with thin server without starting memcached server, I still can login as usual. Should I get some error like no memcached server running or something like that.

I am not sure if rails is using memcached as session store or not.

Can someone tell me what have I missed in using memcached as session store in development environment?

For your information, I have been using devise as authentication gem.

Thanks

1 Answers
Related