def process_response(self, request, response, resource, req_succeeded):
        """Save request context in coupled store object. Set cookie containing a session ID."""
        sid = request.cookies.get(self.cookie_name, None)
        if sid is None or not self.store.exists(sid):
            sid = self.generate_sid()

        self.store.set(sid, request.context.get(self.context_name, {}))
        response.set_cookie(self.cookie_name, sid, expires=self.cookie_expires, max_age=self.cookie_max_age,
                            domain=self.cookie_domain, path=self.cookie_path, secure=self.cookie_secure,
                            http_only=self.cookie_http_only)
def process_response ( self , request , response , resource , req_succeeded ) : sid = request . cookies . get ( self . cookie_name , None ) if sid is None or not self . store . exists ( sid ) : sid = self . generate_sid ( ) self . store . set ( sid , request . context . get ( self . context_name , { } ) ) response . set_cookie ( self . cookie_name , sid , expires = self . cookie_expires , max_age = self . cookie_max_age , domain = self . cookie_domain , path = self . cookie_path , secure = self . cookie_secure , http_only = self . cookie_http_only )
Save request context in coupled store object. Set cookie containing a session ID.