<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: New memcached extension</title>
	<atom:link href="http://zmievski.org/2009/01/new-memcached-extension/feed" rel="self" type="application/rss+xml" />
	<link>http://gravitonic.com/2009/01/new-memcached-extension</link>
	<description>Life, technology, and other good things</description>
	<lastBuildDate>Wed, 11 Jan 2012 23:22:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: predcasna ejakulacia</title>
		<link>http://zmievski.org/2009/01/new-memcached-extension/comment-page-1#comment-2739</link>
		<dc:creator>predcasna ejakulacia</dc:creator>
		<pubDate>Tue, 29 Nov 2011 01:09:48 +0000</pubDate>
		<guid isPermaLink="false">http://gravitonic.com/?p=764#comment-2739</guid>
		<description>Hey, i have a problem with this:

Unknown: Failed to write session data (memcache).

what does it mean? what do i have to do? im scared</description>
		<content:encoded><![CDATA[<p>Hey, i have a problem with this:</p>
<p>Unknown: Failed to write session data (memcache).</p>
<p>what does it mean? what do i have to do? im scared</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrei</title>
		<link>http://zmievski.org/2009/01/new-memcached-extension/comment-page-1#comment-1767</link>
		<dc:creator>Andrei</dc:creator>
		<pubDate>Sat, 01 May 2010 18:12:16 +0000</pubDate>
		<guid isPermaLink="false">http://gravitonic.com/?p=764#comment-1767</guid>
		<description>Bill,

I think this is certainly possible. The only issue is how to have the callback indicate that the read-through (default) value for the key is not found/available. Right not this is done by returning true/false, but if we change it to return the actual key value we&#039;d need some other way to indicate it. Plus, doing so would break BC with the scripts that already use read-through callbacks. I&#039;m inclined to keep the current ($key, &amp;$value, $memc) signature and simply append to it any additional values passed at the call time.</description>
		<content:encoded><![CDATA[<p>Bill,</p>
<p>I think this is certainly possible. The only issue is how to have the callback indicate that the read-through (default) value for the key is not found/available. Right not this is done by returning true/false, but if we change it to return the actual key value we&#8217;d need some other way to indicate it. Plus, doing so would break BC with the scripts that already use read-through callbacks. I&#8217;m inclined to keep the current ($key, &amp;$value, $memc) signature and simply append to it any additional values passed at the call time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill Salak</title>
		<link>http://zmievski.org/2009/01/new-memcached-extension/comment-page-1#comment-1766</link>
		<dc:creator>Bill Salak</dc:creator>
		<pubDate>Sat, 01 May 2010 17:54:59 +0000</pubDate>
		<guid isPermaLink="false">http://gravitonic.com/?p=764#comment-1766</guid>
		<description>Andrei, thanks for the interest. The limitation I was referring to is shown in the Example 1 from http://www.php.net/manual/en/memcached.callbacks.read-through.php

$user_id = substr($key, 5);

would not be necessary if the signature of the callback allowed for arguments to be passed in. 

If the read-through-cache callback api simply handed off the variable values into the callback signature and accepted whatever was returned as the value to the memcached key then there would be no need to define the callback signature outside of userspace. This is what I meant by “would be nice to return a value from the callback”.

With the API I&#039;ve described the onus would be on the programmer to make sure the arguments passed into the callback function via the read-through-cache callback call (memcached-&gt;get) match the signature they&#039;ve designed for the callback. The memcached object could still be passed in but the userspace code would/could ignore this as necessary if it was always passed as the last arg to the callback function autonomously.

These are probably just my personal preferences and the extension is functionally complete as-is so I thank you again for your interest and consideration of these ideas. I have userspace code that does this for the memcache ext you can take a look at if my explanation isn&#039;t clear. Feedback and questions are welcome.</description>
		<content:encoded><![CDATA[<p>Andrei, thanks for the interest. The limitation I was referring to is shown in the Example 1 from <a href="http://www.php.net/manual/en/memcached.callbacks.read-through.php" rel="nofollow">http://www.php.net/manual/en/memcached.callbacks.read-through.php</a></p>
<p>$user_id = substr($key, 5);</p>
<p>would not be necessary if the signature of the callback allowed for arguments to be passed in. </p>
<p>If the read-through-cache callback api simply handed off the variable values into the callback signature and accepted whatever was returned as the value to the memcached key then there would be no need to define the callback signature outside of userspace. This is what I meant by “would be nice to return a value from the callback”.</p>
<p>With the API I&#8217;ve described the onus would be on the programmer to make sure the arguments passed into the callback function via the read-through-cache callback call (memcached-&gt;get) match the signature they&#8217;ve designed for the callback. The memcached object could still be passed in but the userspace code would/could ignore this as necessary if it was always passed as the last arg to the callback function autonomously.</p>
<p>These are probably just my personal preferences and the extension is functionally complete as-is so I thank you again for your interest and consideration of these ideas. I have userspace code that does this for the memcache ext you can take a look at if my explanation isn&#8217;t clear. Feedback and questions are welcome.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ivan Jovanovic</title>
		<link>http://zmievski.org/2009/01/new-memcached-extension/comment-page-1#comment-1765</link>
		<dc:creator>Ivan Jovanovic</dc:creator>
		<pubDate>Thu, 29 Apr 2010 10:36:19 +0000</pubDate>
		<guid isPermaLink="false">http://gravitonic.com/?p=764#comment-1765</guid>
		<description>Hi Andrei,

I&#039;m trying to figure out how to use auto_eject_host feature of libmemcached lib.
I was thinking about setting the behavior through Memcached::setOption() since I see in code that it would handle libmemcached options as default if they are not defined in the php extension.

Do you maybe have some experience with this? 
Would that be enough, or is there some more code to be implemented in php-memcached extension for it to work?

Cheers,
Ivan</description>
		<content:encoded><![CDATA[<p>Hi Andrei,</p>
<p>I&#8217;m trying to figure out how to use auto_eject_host feature of libmemcached lib.<br />
I was thinking about setting the behavior through Memcached::setOption() since I see in code that it would handle libmemcached options as default if they are not defined in the php extension.</p>
<p>Do you maybe have some experience with this?<br />
Would that be enough, or is there some more code to be implemented in php-memcached extension for it to work?</p>
<p>Cheers,<br />
Ivan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Artur Bodera</title>
		<link>http://zmievski.org/2009/01/new-memcached-extension/comment-page-1#comment-1764</link>
		<dc:creator>Artur Bodera</dc:creator>
		<pubDate>Tue, 27 Apr 2010 13:05:39 +0000</pubDate>
		<guid isPermaLink="false">http://gravitonic.com/?p=764#comment-1764</guid>
		<description>Hey Andrei. 
Why have you ignored my email? 
I&#039;ve sent you a patch for php-memcached to enable replicas in session save handler. 

Feel free to contact me.

A.</description>
		<content:encoded><![CDATA[<p>Hey Andrei.<br />
Why have you ignored my email?<br />
I&#8217;ve sent you a patch for php-memcached to enable replicas in session save handler. </p>
<p>Feel free to contact me.</p>
<p>A.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrei</title>
		<link>http://zmievski.org/2009/01/new-memcached-extension/comment-page-1#comment-1763</link>
		<dc:creator>Andrei</dc:creator>
		<pubDate>Mon, 26 Apr 2010 00:17:33 +0000</pubDate>
		<guid isPermaLink="false">http://gravitonic.com/?p=764#comment-1763</guid>
		<description>Bill,

What do you mean by &quot;would be nice to return a value from the callback&quot;? Where would this value be used? I&#039;ll see if it would be possible to support passing additional arguments to the callbacks.</description>
		<content:encoded><![CDATA[<p>Bill,</p>
<p>What do you mean by &#8220;would be nice to return a value from the callback&#8221;? Where would this value be used? I&#8217;ll see if it would be possible to support passing additional arguments to the callbacks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jianzi</title>
		<link>http://zmievski.org/2009/01/new-memcached-extension/comment-page-1#comment-1762</link>
		<dc:creator>jianzi</dc:creator>
		<pubDate>Thu, 22 Apr 2010 15:25:34 +0000</pubDate>
		<guid isPermaLink="false">http://gravitonic.com/?p=764#comment-1762</guid>
		<description>Hi Andrei,
I want use Memcached client library and UDP mod to connect memcached server. but i can&#039;t find any way to do that.

can&#039;t you help me or tell me some way to do that? 

thanks. 


sorry. my english is bad.  -.-!!</description>
		<content:encoded><![CDATA[<p>Hi Andrei,<br />
I want use Memcached client library and UDP mod to connect memcached server. but i can&#8217;t find any way to do that.</p>
<p>can&#8217;t you help me or tell me some way to do that? </p>
<p>thanks. </p>
<p>sorry. my english is bad.  -.-!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill Salak</title>
		<link>http://zmievski.org/2009/01/new-memcached-extension/comment-page-1#comment-1761</link>
		<dc:creator>Bill Salak</dc:creator>
		<pubDate>Wed, 07 Apr 2010 22:37:52 +0000</pubDate>
		<guid isPermaLink="false">http://gravitonic.com/?p=764#comment-1761</guid>
		<description>Yes of course! this makes perfect sense that it would. 

I&#039;m finding the required signature of the callback function to be a bit limiting. The callback functions need to be so specific to the use case of the callback that we&#039;re required to write these as wrappers to more reusable functions. It would be nice to be able to return a value from the callback and to be able to pass in an array of arguments to the Memcached methods that support the read-through cache that get expanded into the callback function signature. No complaints here, just a few suggestions.</description>
		<content:encoded><![CDATA[<p>Yes of course! this makes perfect sense that it would. </p>
<p>I&#8217;m finding the required signature of the callback function to be a bit limiting. The callback functions need to be so specific to the use case of the callback that we&#8217;re required to write these as wrappers to more reusable functions. It would be nice to be able to return a value from the callback and to be able to pass in an array of arguments to the Memcached methods that support the read-through cache that get expanded into the callback function signature. No complaints here, just a few suggestions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrei</title>
		<link>http://zmievski.org/2009/01/new-memcached-extension/comment-page-1#comment-1760</link>
		<dc:creator>Andrei</dc:creator>
		<pubDate>Wed, 07 Apr 2010 01:16:07 +0000</pubDate>
		<guid isPermaLink="false">http://gravitonic.com/?p=764#comment-1760</guid>
		<description>Bill,

Yes, the callback can be in any of the formats supported by PHP and listed here under &quot;Callback&quot;:

http://php.net/callback</description>
		<content:encoded><![CDATA[<p>Bill,</p>
<p>Yes, the callback can be in any of the formats supported by PHP and listed here under &#8220;Callback&#8221;:</p>
<p><a href="http://php.net/callback" rel="nofollow">http://php.net/callback</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill Salak</title>
		<link>http://zmievski.org/2009/01/new-memcached-extension/comment-page-1#comment-1759</link>
		<dc:creator>Bill Salak</dc:creator>
		<pubDate>Wed, 07 Apr 2010 01:09:21 +0000</pubDate>
		<guid isPermaLink="false">http://gravitonic.com/?p=764#comment-1759</guid>
		<description>Nicely done, completely replaces our own wrapper for PECL/Memcache which we wrote to enable read-through-cache callbacks and the interface is much cleaner to work with than PECL/Memcache. 

Does PECL/Memcached support object references like call_user_func_array ? i.e. cache_cb can be an array in the form of array(~object reference~, ~callback method~) ? If not I&#039;d like to suggest that feature for consideration as we&#039;ve found it very empowering. If it does have it - it would seem to be missing from the official docs.

thanks in advance for your answer.</description>
		<content:encoded><![CDATA[<p>Nicely done, completely replaces our own wrapper for PECL/Memcache which we wrote to enable read-through-cache callbacks and the interface is much cleaner to work with than PECL/Memcache. </p>
<p>Does PECL/Memcached support object references like call_user_func_array ? i.e. cache_cb can be an array in the form of array(~object reference~, ~callback method~) ? If not I&#8217;d like to suggest that feature for consideration as we&#8217;ve found it very empowering. If it does have it &#8211; it would seem to be missing from the official docs.</p>
<p>thanks in advance for your answer.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

