Re: [Cppcms-users] session.server.settings example
Brought to you by:
artyom-beilis
|
From: Christian G. <chr...@gm...> - 2013-04-26 10:22:28
|
2013/4/23 Christian Gmeiner <chr...@gm...>:
> Hi all
>
> "session" : {
> "expire" : "renew",
> "timeout" : 600,
> "keep_alive_interval" : 60,
> "location" : "server",
> "gc" : 600,
> "server": {
> "storage":"external",
> "shared_object":"/opt/libcppcms_session_memory_ext.so",
> "settings":"dir:'/session_storage/'"
> }
> },
>
> session_memory_ext_storage(cppcms::json::value const &val)
> {
> base_ = val.get<std::string>("dir", "/tmp/");
> BOOSTER_INFO("session_memory_ext") << "base folder '" << base_;
> }
>
> How must my config.js look like to get this working?
>
Soo.. i tried this snipped
cppcms::json::value a;
cppcms::json::object o;
o.insert(std::pair<cppcms::string_key,
cppcms::json::value>("test", "/home/abc"));
a.object(o);
BOOSTER_DEBUG("a") << "json - " << a.save();
BOOSTER_DEBUG("a") << a.get<std::string>("test", "/tmp/");
-->
Apr 26 12:48:58 chgm-pc a: a: json - {"test":"/home/abc"} (main.cpp:227)
Apr 26 12:48:58 chgm-pc a: a: /home/abc (main.cpp:228)
-->
"session" : {
"expire" : "renew",
"timeout" : 600,
"keep_alive_interval" : 60,
"location" : "server",
"gc" : 600,
"server": {
"storage" : "external",
"shared_object" :
"/opt/tssw/libcppcms_session_memory_ext.so",
"settings" : {
"dir" : "/home/abc",
},
}
},
-->
cppcms::json::bad_cast: error converting from object
Any hints?
--
Christian Gmeiner, MSc
|