<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML DIR=ltr><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"></HEAD><BODY><DIV><FONT face='Arial' color=#000000 size=2>I've spent some time today working on the next version of 
my php extension based off libmemcache.&nbsp; I'm posting the list of 
changes/fixes I've come up with so far for community review and 
comments.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Fixes:</FONT></DIV>
<DIV><FONT face=Arial size=2>1) In the intial release, bools, longs, doubles, 
and strings were all returned as strings, due to the way types work in php this 
would normally work fine, but now they return in the exact same type as they 
were when you set them.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>2) flags is not an option to set, add, or replace 
commands.&nbsp; The flags field was never able to be retrieved from getcommand, 
and it is used internally by the extension to keep track of types and 
serialization.&nbsp; As such I think the best thing to do is not support it from 
an end user perspective.&nbsp; If you need flags do something like 
$mc-&gt;set('key', Array('val'-&gt;myvalue, 'flags'-&gt;myflags));&nbsp; This 
breaks the api for set, add, and replace, but its pretty trivial.&nbsp; The 
version number will bump to 1.1.0 to indicate this.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Features:</FONT></DIV>
<DIV><FONT face=Arial size=2>1) Persistent memcache objects/connections.&nbsp; 
</FONT><FONT face=Arial size=2></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>The thing that is problematic is that you only want 
to add each server once, I'm probably going to end up keeping track of which 
servers have been added internally in the object, and then detecting duplicate 
calls and ignoring them.&nbsp; Then it would look like:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>&lt;?</FONT></DIV>
<DIV><FONT face=Arial size=2>$mc = pmemcache('unique key for this 
object');</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>if($mc) {</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;</FONT><FONT face=Arial 
size=2>$mc-&gt;add_server('localhost', '11211');&nbsp; // this is only actually 
run the first time its called on the persistent object</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp; //set/get/whatever as usual</FONT></DIV>
<DIV><FONT face=Arial size=2>}</FONT></DIV>
<DIV><FONT face=Arial size=2>?&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>The only other option I came up with was to pass an array of servers to the 
pmemcache() function itself, but I like not doing that as calling add_server as 
stated in the above option seems more flexible in allowing new servers to be 
added later without creating a new object.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Anyway, this is 99.9% functional (just need to fix duplicate calls to 
add_server to not keep adding more connections), and I did some testing of it 
tonight.&nbsp; I plan to get everything finished and tested within the next 
couple of days and I'll push the code out to the site.</DIV>
<DIV>&nbsp;</DIV>
<DIV>John</DIV>
<DIV>&nbsp;</DIV>
<DIV><A 
href="http://www.klir.com/~johnm/php-mcache/">http://www.klir.com/~johnm/php-mcache/</A></DIV></FONT></DIV></BODY></HTML>