<?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>Wed, 22 May 2013 17:08:17 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Dave Marshall's Blog: Defending against Cache Stampedes]]></title>
      <guid>http://www.phpdeveloper.org/news/17393</guid>
      <link>http://www.phpdeveloper.org/news/17393</link>
      <description><![CDATA[<p>
<i>Dave Marshall</i> has a new post to his blog showing one method for <a href="http://davedevelopment.co.uk/2012/01/13/defending-against-cache-stampedes.html">defending against cache stampedes</a> from assaulting your caching servers and (possibly) bringing them down.
</p>
<blockquote>
I've recently had a problem with a rather large operation (that could probably be optimised considerably, but nevermind), where by if the cached result of the operation expired, several web server threads would attempt the operation, causing some major headaches for our database and web servers. This is something I've come across before, and is commonly(?) known as a <a href="http://en.wikipedia.org/wiki/Cache_stampede">Cache Stampede</a>. This is bad, this post describes the basics of what I've done to deal with it.
</blockquote>
<p>
His example uses a Zend_Cache interface to Memecache, but it could be applied in other places too. His method uses a <a href="http://en.wikipedia.org/wiki/Semaphore_%28programming%29">binary semaphore</a> to check and see if there's a "lock" and sleep for a bit before checking again. Sample code is included showing how to create this system and how to refresh the data with a new expiration on a cache miss.
</p>]]></description>
      <pubDate>Fri, 13 Jan 2012 13:13:08 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Kevin Schroeder's Blog: Pre-caching FTW]]></title>
      <guid>http://www.phpdeveloper.org/news/15703</guid>
      <link>http://www.phpdeveloper.org/news/15703</link>
      <description><![CDATA[<p>
In <a href="http://www.eschrade.com/page/precaching-4d25dc90">this new post</a> to his blog <i>Kevin Schroeder</i> suggests that there's something even better than doing the typical caching inline (request, write to cache) - pre-caching.
</p>
<blockquote>
I just had an epiphany.  I've talked about <a href="http://www.eschrade.com/page/precaching-content-with-zend_cache_manager-zend-server-queue-4bd1fdd4">pre-caching content before and the benefits thereof</a> before.  But this is the first time I realized not only that there are benefits, but that doing it is BETTER than caching inline.  Let me sum up... no, there is to much.  Let me explain.
</blockquote>
<p>
He gives an example of how a typical application might cache - when it finds a "miss" for the data it's trying to pull. A simple cache is easy, but what happens if it uses a configuration value that could change (like the username/password in his second example). Pre-caching would eliminate the risk since the setting would be known to be valid when the cache is generated.
</p>]]></description>
      <pubDate>Fri, 07 Jan 2011 11:16:57 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Marco van Hylckama Vlieg's Blog: PHP developers - wakey wakey!]]></title>
      <guid>http://www.phpdeveloper.org/news/4878</guid>
      <link>http://www.phpdeveloper.org/news/4878</link>
      <description><![CDATA[In <a href="http://www.i-marco.nl/weblog/archive/2006/02/06/php_developers_wakey_wakey">this post</a> from <i>Marco van Hylckama Vlieg</i> motivating PHP developers to work harder at their code and move things up to the latest versions.
<p>
<quote>
<i>
I placed this entry under 'programming' but it might as well have been placed under 'rants' really. I've been programming PHP for over six years now. It's still definitely my language of choice because of it's speed, ease of use, ease of deployment and last but not least: because of the huge community with all of it's advantages. However there's one thing that's really bugging me lately: PHP is seriously suffering from what a friend of mine called 'the Apache syndrome'. Apache 2.x has been released a long, long time ago. Yet, tons of servers are still running 1.3.x and they probably will continue to do so for years to come.
<p>
While this isn't all that serious for a webserver (as long as it serves it's stuff and the server doesn't break it's fine) I believe the case is different with PHP.
</i>
</quote>
<p>
He <a href="http://www.i-marco.nl/weblog/archive/2006/02/06/php_developers_wakey_wakey">goes on</a> to say that PHP is loosing out on the "coolness factor" to Ruby on Rails, and that most PHP developers out there just aren't taking advantage of the new features/better performance that PHP5 has to offer.]]></description>
      <pubDate>Tue, 21 Feb 2006 07:22:18 -0600</pubDate>
    </item>
  </channel>
</rss>
