mperham/dalli — Issue #163: Session Timeout Hook/Callback
Author: mhaseebkhan
Created: 2012-01-23 08:35:14+00:00
State: open

I am working on a Sinatra App in which I am using Rack::Session::Dalli for managing sessions. How I am setting-up the Session, please see below:

```ruby
use Rack::Session::Dalli, :memcache_server => CONFIG[:session_memcache_server], :username => CONFIG[:session_memcache_user], :password => CONFIG[:session_memcache_password], :compression => true, :expires_in=>CONFIG[:session_timeout], :expire_after=>CONFIG[:session_timeout], :httponly => true, :key => CONFIG[:session_key], :secret => CONFIG[:session_secret], :path => '/'
```

As you can see, I am specifying the *session timeout*. What I need is a callback which gets fired when the session expires.

Can someone please provide some pointers as how to achieve it?

Thanks.