In your registry file:
%w(rubygems rack sinatra).each { |dependency| require dependency } disable :run require 'myapp' sessioned = Rack::Session::Pool.new( Sinatra::Application, :domain => 'example.com', :expire_after => 60 * 60 * 24 * 365
To run run rackup app.ru or use Passenger, etc. This should bring your application to the session pool and enable its functionality. I do not quite understand why this should not be used, like most other middlewares.
Understand that I have not tested this at all, I have not yet had what is needed for session pools. I wrote this from the documentation for Rack :: Session :: Pool, which had an example at the top of the page. Therefore, I canβt say exactly how to use it.
Robert K
source share