Let's see how to extract keys from memcache server. And I have done a modification in Arnout Kazemier’s simple_cachedump.js and then improved the NodeJs responses by prior calculation of available number of keys.
Output:
Note: Please write your queries and suggestion as comment.
Worked for me, except I had to make sure to parse the stats and itemSet[stats].number to int first otherwise memcached returned an error concerning an incorrect slab id format. I made the following change
Thanks...worked for me ..But I have one doubt in cachedump when I hit my url to get all keys the same keys are coming as twice instead of 200 it gives 400 keys.Why this happens to me?
Ideally, it won't possible to happen like. Because, Memcache is working as key-value pair. I guess, you have problem in your code. It may happens that your variable is not cleared.
Worked for me, except I had to make sure to parse the stats and itemSet[stats].number to int first otherwise memcached returned an error concerning an incorrect slab id format. I made the following change
ReplyDeletememcached.cachedump(itemSet.server, parseInt(stats),
parseInt(itemSet[stats].number), function(err, response) {
Thanks...worked for me ..But I have one doubt in cachedump
ReplyDeletewhen I hit my url to get all keys the same keys are coming as twice instead of 200 it gives 400 keys.Why this happens to me?
This comment has been removed by the author.
DeleteIdeally, it won't possible to happen like. Because, Memcache is working as key-value pair. I guess, you have problem in your code. It may happens that your variable is not cleared.
Delete