#include #include #include "../memcache-lite.h" int main() { int ret = 0; const char path[] = "/tmp/socket"; char foo[] = "hello world"; memcache_state_t *state; state = memcache_initialize(); memcache_connect(state, path); ret = memcache_set(state, "test", foo, 0, time(NULL)+3600, sizeof(foo)); if (ret != 0) printf("not stored\n"); else printf("stored\n"); memcache_destroy(state); return 0; }