I want to use the GWAN API Key-Value to record and read a number of data (in a multi-threaded way). The problem is that my recordings are only available on the current page and therefore can not be used on my other pages.
Can you show me an example or explain how to create a persistent KV store (which will be accessible on all my subdomains) ?
Here is an example that I currently use:
kv_t store;
kv_init(&store, "users", 10, 0, 0, 0);
kv_item item;
item.key = "pierre";
item.klen = sizeof("pierre") - 1;
item.val = "pierre@example.com";
item.flags = 0;
kv_add(&store, &item);
char *p = kv_get(&store, "pierre", sizeof("pierre") - 1);
xbuf_xcat(get_reply(argv), "<br>pierre's email address: %s<br>", p);
but is not persistent.