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

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -