<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sat, 25 May 2013 20:34:29 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Elijaa.org: Using cas() command from PECL Memcached]]></title>
      <guid>http://www.phpdeveloper.org/news/15236</guid>
      <link>http://www.phpdeveloper.org/news/15236</link>
      <description><![CDATA[<p>
On Elijaa.org there's an <a href="http://www.elijaa.org/blog/index.php?post/2010/05/05/cas-command-pecl-memcached">interesting post</a> (from back in May 2010) about using the "cas()" command in the memcached PECL extension to update the cached value of an object while preventing collisions with other scripts that might be updating the same value.
</p>
<blockquote>
A series of commands is not atomic. If you issue a 'get' against an item, operate on the data, then wish to 'set' it back into memcached, you are not guaranteed to be the only process working on that value. In parallel, you could end up overwriting a value set by something else. [...] But PECL Memcached come with a useful function : cas().
</blockquote>
<p>
The "cas()" function uses a checksum pulled out when the data is uplled using "get()". This token along with the updated data is passed into the "cas()" method that does the additional checking for you. A code snippet is included to show you its use.
</p>]]></description>
      <pubDate>Wed, 06 Oct 2010 09:16:44 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ibuildings techPortal: New Memcached Extension for PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/12728</guid>
      <link>http://www.phpdeveloper.org/news/12728</link>
      <description><![CDATA[<p>
The Ibuildings techPortal website has posted <a href="http://techportal.ibuildings.com/2009/06/22/new-memcached-extension-for-php/">a new article</a> from <i>Lorna Mitchell</i> looking at the new and improved memcached extension (as most recently updated by <i>Andrei Zmievski</i>).
</p>
<blockquote>
The idea behind the new extension is to leverage the functionality contained libmemcached - a solution which has been widely adopted across many scripting communities and beyond. The extension is available in PECL and has lots of shiny new functionality. This article looks at how to obtain and work with the new extension, and also shows off a couple of the new features it includes.
</blockquote>
<p>
<i>Lorna</i> talks a bit about the features of the extension in general but mentions two great new ones specifically - the "getmulti" fetch method allows for grabbing multiple chunks of cached information and the cas (compare and swap) function that works the same as a replace but checks the current contents first.
</p>]]></description>
      <pubDate>Mon, 22 Jun 2009 10:27:51 -0500</pubDate>
    </item>
  </channel>
</rss>
