Re: [Cppcms-users] Session Load and Save events
Brought to you by:
artyom-beilis
|
From: Artyom B. <art...@ya...> - 2013-09-18 06:00:00
|
- The session is loaded automatically in synchronous applications before the application::main is called. - In asynchronous applications you need to call load() - because session loading can be blocking )depending on the backend) - so use with care. - The session is saved upon first output from the program - i.e. when you need to send the HTTP headers. i.e. you call out() the session is automatically saved. You can save it manually before the out() is called using save(). Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: Joseph Antony <jsa...@gm...> >To: cpp...@li... >Sent: Tuesday, September 17, 2013 11:08 PM >Subject: [Cppcms-users] Session Load and Save events > > >Hi Artyom, > >I have been tinkering with CPPCMS in the last few weeks after its discovery >and I must say it is a wonderful work from you. It has a great potential as >a highly scalable and light-weight web server application. I have a set >C/C++ libraries which has so far no face and I would like to use CPPCMS to >build a WebAPI face for them. So I thank you very much for contributing a >such a great useful product. > >My question is, within the web application process, how I do I get to know >when a session is loaded and when the session is saved (to the file or other >persistence options you have provided). Session interface currently exposes >"save" and "load" methods. It also allows us to set an expiration policy >which enables the session to expire when it is idle. But how the web >application process will be notified of such events as Session::Load and >Session::Save in order to employ some critical operation such as updating a >table in the database about when a user's session started and terminated ? > >Your advice is greatly appreciated. > >Joseph. > > >------------------------------------------------------------------------------ >LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! >1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint >2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes >Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. >http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |