memcached
Jose Celestino
japc at co.sapo.pt
Wed May 16 17:33:47 UTC 2007
Words by Julio Leyva [Wed, May 16, 2007 at 05:02:08PM +0000]:
> I installed the postgresql API to talk to memcached
>
> I have two servers running memcached
> I added two servers
>
> memcache_server_add('localhost','11211');
> memcache_server_add('testmem','11211');
>
> both hosts can see each other
>
> So I added some data
>
> memcache_add(''1234'',''Ioana'');
> memcache_add(''1235'',''Yan'');
>
> the retrieved it
>
> memcache_get('1234')
>
> so I got back 'Ioana'
>
> However when I retrieve the stats
>
> memcache_stats();
>
> I only get stats for the localhost, nothing for the 'testmem' server
>
> It means even if I added two memcached servers, I'm only talking to the localone?
>
That depends on the client implementation. When you *_add and *_get the
key gets hashed and it goes to one of the configured servers.
For the memcache_stats the lib needs to consolidate the information from
all the configured servers.
Why do you say it iѕ only localhost returned? mcm_stats() loops through
all servers.
--
Jose Celestino
----------------------------------------------------------------
http://www.msversus.org/ ; http://techp.org/petition/show/1
http://www.vinc17.org/noswpat.en.html
----------------------------------------------------------------
"And on the trillionth day, Man created Gods." -- Thomas D. Pate
More information about the memcached
mailing list