This just came up in another context. There's no way to do it via the 
public API, but I think it should work if you use one of the private 
methods:

session._try_store_in_db(request, response)  # for sessions in db
session._try_store_in_cookie_or_file(request, response)  # for sessions in 
cookies or files
session.forget(response)  # so it won't repeat the process at the end of 
the request

Anthony

On Wednesday, April 24, 2013 9:17:56 AM UTC-4, Srinath G S wrote:
>
> HI,
>
> From web2py book,
> http://www.web2py.com/book/default/chapter/06
>
> try:
>      execute models, controller function and view
> except:
>      rollback all connections
>      log the traceback
>      send a ticket to the visitor
> else:
>      commit all connections
>      save cookies, sessions and return the page
>
> As per this, the sessions are saved almost when the request is about to be 
> closed.
>
> How to save session data manually? Probably I set something in session at the 
> beginning of a function and I would want to save it immediately.
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to