Reputation: 27008
I would like to know in Rails
what is the difference between
ActionDispatch::Sessions::CookieStore and ActionDispatch::Sessions::CacheStore
For CacheStore, i assume Rails store the session in memory(RAM)? What about CookieStore, where are they storing?
Kit
Upvotes: 3
Views: 1718
Reputation: 4982
CookieStore
is stored in the client's browser as a cookie. The cookie is signed with your application's secret key so theoretically they should not be able to tamper with it. See here for more information.
CacheStore
is stored in whatever ActiveSupport::Cache::Store
is using to store information (i.e. memcached or redis, on the server side not on the client side). See here for more information.
Upvotes: 3