Sex expire time for Sessions in memcached

Hi all,

I have a problem with expiring sessions in the case with using
mem_cache_store. I’ve been using ActiveRecord session store till now and
expired them with SQL query. Yesterday I switched to memcache for
storing sessions, however I can’t set an expireation period.

My current config is this:

memcache_options = {
:c_threshold => 10_000,
:compression => false,
:debug => false,
:namespace => ‘fanopic_dev’,
:readonly => false,
:urlencode => false
}
memcache_servers = [‘192.168.4.1:11211’]
config.cache_store = :mem_cache_store, memcache_servers,
memcache_options
config.action_controller.session_store = :mem_cache_store

CACHE = MemCache.new(memcache_options)
CACHE.servers = memcache_servers
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.merge!({ ‘cache’
=> CACHE })

Does anyone has an idea how I can specify a expire period for the
sessions?
10x in advance.

ups,

I’m sorry about the title. It’s TIPO.