php - Real time update with nodejs and memcached -
i have nodejs server socket.io, broadcasting data. data i'm trying memchached. works well, want create live broadcasting. data updating php side. how can retrieve data in nodejs when changing php? may callback nodejs side or event triggering ? current code not live.
php:
$mem = new memcached(); $mem->addserver("127.0.0.1", 11211); $mem->set($key, "customdata", 10);
nodejs:
var memcached = require('memcached'); var memcached = new memcached('127.0.0.1:11211'); memcached.gets('key', function (err, result) { console.log(result.key); })
Comments
Post a Comment