sockjs.tornado.sessioncontainer¶
sockjs.tornado.sessioncontainer¶
Simple heapq-based session implementation with sliding expiration window support.
- class sockjs.tornado.sessioncontainer.SessionMixin(session_id=None, expiry=None)[source]¶
Represents one session object stored in the session container. Derive from this object to store additional data.
- __init__(session_id=None, expiry=None)[source]¶
Constructor.
- session_id
- Optional session id. If not provided, will generate new session id.
- expiry
- Expiration time. If not provided, will never expire.
- class sockjs.tornado.sessioncontainer.SessionContainer[source]¶
Session container object.
If we will implement sessions with Tornado timeouts, for polling transports it will be nightmare - if load will be high, number of discarded timeouts will be huge and will be huge performance hit, as Tornado will have to clean them up all the time.