Is `get key` the only way to check if a key exists?

2011-08-20 Thread m2guru
Looking at stats output: STAT cmd_get 51 STAT get_hits 32 STAT get_misses 19 19+32=51, so the stats do make perfect sense. In my (very early stage) code I'm doing something very basic: if ( $cache = $mc-get($key) { // use cached data die($cache); }else{ // use output buffering with a

Re: Is `get key` the only way to check if a key exists?

2011-08-20 Thread dormando
The main reason I ask is, I was wondering if there is any smarter way to check if a key exists, because, I'm just thinking that it would be advantageous to be able to differentiate a get_miss for a reason different than the key wasn't cached yet, like application logic error, versus

Re: Is `get key` the only way to check if a key exists?

2011-08-20 Thread Geoffrey Hoffman
On Sat, Aug 20, 2011 at 11:56 AM, dormando dorma...@rydia.net wrote: The main reason I ask is, I was wondering if there is any smarter way to check if a key exists, because, I'm just thinking that it would be advantageous to be able to differentiate a get_miss for a reason different than