[Cppcms-users] app().session().erase() doesn't work or not permitted?
Brought to you by:
artyom-beilis
From: <ele...@ex...> - 2012-04-20 03:00:04
|
I've just added a simple message to be displayed on website. ie. session().set("msg", "User Updated"); And then in my content class I have a get_message() function which gets called from inside a template. get_message() does simple - string msg; if (app().session().is_set("msg")) { msg = app().session().get("msg"); //works app().session().erase("msg"); // doesn't work } return msg; // always returns text because it never gets erased Is modifying a session via app().session() not permitted or is it a bug? Erasing the key from controller works fine. Another question - why is session_interface::get() not const? Cheers, Petr |