Ben Bleything wrote: > On Thu, Feb 14, 2008, Tony Garcia wrote: >> I was wondering if there is a way to handle reading keys when you don't >> know what the keys are, using memcache-client... > > Do you mean discovering what keys are stored in the cache or reading the > value of MYSTERY KEYS(tm)? > > Ben I suppose a little more clarification would help: I need to pass information (for example, an email address) based on user name from a rails application to a disconnected ruby process through the cache. The external process has no way to know what users are being passed to it. I had wanted to use the user name as the key, but it seems that I can't find the values of current keys in the cache - at least not with memcache-client. So far, about the best I've found is to set the cache as a hash: Cache["users"] = { "user1"=>"user1 / example.com", "user2"=>"user2 / example.com" } Is there any better way? -- Posted via http://www.ruby-forum.com/.