memcache(3) 1.2.0 released...
Sean Chittenden
sean at chittenden.org
Thu Jan 13 02:18:17 PST 2005
>> 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
More information about the memcached
mailing list