Sessions are disabled with "config.cache_classes =true"


I found that sessions are disabled and can’t login with

Session and login works fine with “config.cache_classes = false” but
it doesn’t work with “config.cache_classes = true”.
It doesn’t show any errors, but redirect to login page.
It seems to be post nothing.

Does it have to do with session_storre, active_record_store,
protect_from_forgery, or other configrations?

my enviroments is Rails 2.2.2 Ruby 1.8.6

Any ideas?