Let's say I have a working memcached deamon on the server. Let's say that this server is capable of handling server side Javascript ( APE in my case).
Accessing memcached with some Javascript on the server should be easy (I mean, in my opinion ...).
But I have to admit that my idea is ending ...
"Help plz"? :)
thank
EDIT:
It works:
Ape.registerCmd("CMD", true, function(params, infos) {
Ape.log("cmd called");
var socket = new Ape.sockClient("11211", "127.0.0.1", {flushlf: true});
socket.onConnect = function() {
Ape.log("Connected to Memcached");
Ape.log("Issued 'stats' commande to Memcached...");
this.write("stats\n");
this.onRead = function(data) {
Ape.log("Data from memcached : " + data);
}
}
infos.sendResponse('return', {'data':data});
});
source
share