Cross-client memcached compatibility

Tomash Brechko tomash.brechko at gmail.com
Sun Feb 3 17:13:33 UTC 2008


On Sun, Feb 03, 2008 at 10:00:18 -0700, Larry Leszczynski wrote:
> Not sure I understand - what if $data is an array ref, where I expect 
> the whole thing to get serialized?  I.e. how would the hook 
> distinguish $data which is an array ref I want entirely serialized vs 
> $data which is an array ref where one element of the array is a 
> serialization method?

It will not.  I wrote there that the hook will be written so that it
expects two elem array, where first item is data, and last item is a
flag.  Always.

The point is, it wouldn't be a part of the module interface.  Instead,
it's your, as a programmer, internal protocol.  I.e. it will be you
who will write such hook, and decide on the presentation, be it
[$data, $flag], or { data => $data, flag => $flag }, or something else
(like hook examining some global var).

I think this is more flexible that adding one more knob to the module
interface.


-- 
   Tomash Brechko


More information about the memcached mailing list