Thanks,
Michael
It seems that one approach to do this will be to write a SessionManager,
similar to CacheManager and then modify the SessionMiddleware to use it
instead of directly using the Session object. My knowledge on this is
limited, but if someone can outline what's the best way to do this, I
can definitely take a shot it.
DD
In middleware.py, right before it initializes the main session from config:
session2_opts = {
'session.type': 'cookie',
'session.key': 'sess2',
'session.cookie_expires': True,
'session.auto': True,
'session.domain': config['session.domain'],
'session.secure': False,
}
app = SessionMiddleware(app, environ_key='beaker.session2', config
= session2_opts)
app = SessionMiddleware(app, config)
And then access this session object using:
s2 = environ['beaker.session2']
s2['param'] = val
....
You can create the new session directly in middleware. It does not read
the config file (but can be made to do so pretty easily).
DD.