mperham/dalli — pull request #423 by arthurnn (2014-01-09 21:19:45+00:00)
Title: Fix rack store

When using `Dalli` as cache store, and the memcached server not being up, we get a weird error:
`Rack app error: #`
see https://github.com/arthurnn/octostalker/issues/18 for full stacktrace.

The problem only happens on rack 1.5+ because if memcache is not up, we will return `nil` on `session.id` and not try to regenerate it again, see https://github.com/rack/rack/commit/c751b4747ff7a85d5c1e6c030211ccfa219714a3
IMO Rack behaviour is right, as it is responsibility of the store to return an ID.

Rack main memcached store doesnt have this problem as they raise an error if the servers are not available https://github.com/rack/rack/blob/4defbe5d7c07b3ba721ff34a8ff59fde480a4a9f/lib/rack/session/memcache.rb#L37

thoughts @mperham ?
cc @spastorino as we discussed that briefly.