logo       

Re: memcache(3) 1.2.0 released...: msg#00034

web.cache.memcached

Subject: Re: memcache(3) 1.2.0 released...

Sure, but an empty string is not the same as a FALSE if I am storing
both and considering them distinct. I know about ===. But I want to
get exactly what I store back from memcached, if I store an '' or a
FALSE then I should get exactly a '' or a FALSE in return and when I
test with === it should match up.

As i understand, memcached only stores and retrives strings and does not
handle anything else, for example boolean. That's because internally,
memcached stores raw bytes and a length, but does not store a type of
data.
The only Right Way i see here is to store TRUE and FALSE as "1" and "0"
strings.

*bzzt* Close, but not quite. Store true and false as 1 and 0, but don't forget about the client flags. :) 1 can be an integer or a string, or a boolean depending on the client flags. That field should really be broken down into two fields, data flags, and data type, but I digress... -sc

--
Sean Chittenden




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise