<?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>Mon, 21 May 2012 07:35:51 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[S&eacute;bastien Thomas' Blog: Monitoring PHP APC cache usage]]></title>
      <guid>http://www.phpdeveloper.org/news/16954</guid>
      <link>http://www.phpdeveloper.org/news/16954</link>
      <description><![CDATA[<p>
<i>S&eacute;bastien Thomas</i> has a recent post to his blog shows how (with just a bit of code) you can <a href="http://www.lecentre.net/blog/archives/1311">monitor your APC cache usage</a> on your local host.
</p>
<blockquote>
I won't go deep into how OpCode caches work, you will find a lot of docs, just google for APC, Xcache, eAccelerator... What I can say is that APC (as other caches do) will save binary parts of your PHP code into memory and use it when you call for the same PHP function again. This way you save all the PHP file opening, parsing, etc. [...] One thing you won't come accross often on internet is How (the hell) do I know if APC is performing well ?
</blockquote>
<p>
His answer comes in the form of code based on the <a href="https://github.com/wwalter/apc-php-monitor">APC-PHP-Monitor script</a>. He changed it slightly to allow for use in other places, like with Nagios monitoring. A Nagois template is included to query the cache and report back a hit ratio. An example of the full cache results can be <a href="http://www.lecentre.net/blog/wp-content/uploads/2011/10/APC-INFO-qxat3p01-10.100.34.39-Mozilla-Firefox_2011-10-03_14-48-04.jpg">seen here</a> complete with general cache info, hits, misses and file versus user caching stats.
</p>]]></description>
      <pubDate>Wed, 05 Oct 2011 13:11:14 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPClasses.org: Lately in PHP Episode 16 - APC in PHP, MODX CMS, Top Developers]]></title>
      <guid>http://www.phpdeveloper.org/news/16932</guid>
      <link>http://www.phpdeveloper.org/news/16932</link>
      <description><![CDATA[PHPClasses.org has posted their latest episode of their "Lately In PHP" podcast today - <A href="http://www.phpclasses.org/blog/post/160-PHP-540-Will-not-Include-APC-Is-MODX-CMS-better-than-Wordpress-Top-PHP-Developers-in-Every-Country--Lately-in-PHP-Episode-16.html">PHP 5.4.0 Will not Include APC, Is MODX CMS better than Wordpress? Top PHP Developers in Every Country</a>.
</p>
<blockquote>
PHP 5.4 beta 1 was released but APC is not going to be included at least in PHP 5.4.0. Manuel Lemos and Ernani Joppert discuss this and other happenings in the PHP world, like the adoption of more robust Continuous Integration methods to prevent shipping buggy PHP versions like what happened with PHP 5.3.7.
</blockquote>
<p>
The podcast also features an interview with <i>Bob Ray</i>, an author and contributor to the <a href="http://www.modx.com/">MODX CMS platform</a> project. You can listen to this latest episode either through <a href="http://www.phpclasses.org/blog/post/160-PHP-540-Will-not-Include-APC-Is-MODX-CMS-better-than-Wordpress-Top-PHP-Developers-in-Every-Country--Lately-in-PHP-Episode-16.html">the in-page player</a>, by <a href="http://www.phpclasses.org/blog/post/160/file/88/name/Lately-In-PHP-16.mp3">downloading it directly</a> or by <a href="http://www.phpclasses.org/blog/category/podcast/post/latest.rss">subscribing to their feed</a> and getting this and past shows automatically.
</p>
]]></description>
      <pubDate>Fri, 30 Sep 2011 09:11:53 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Script-Tutorials.com: How to Use APC Caching with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16860</guid>
      <link>http://www.phpdeveloper.org/news/16860</link>
      <description><![CDATA[<p>
On Script-Tutorials.com today there's a new article introducing you to <a href="http://www.script-tutorials.com/how-to-use-apc-caching-with-php/">using APC caching</a> in your PHP applications. Their simple example sets up a caching class that handles the dirty work for you.
</p>
<blockquote>
Today I have another interesting article for PHP. We will talking about caching, and practice of using caching in php. I will make review of APC caching and will show you how you can use APC in PHP. [...] Now people have learned to use the server memory for data storage. RAM much faster than hard disk, and the price of memory falls all the time, so let's use all these advantages of this.
</blockquote>
<p>
Included in the post is the code for a few different files - the caching class itself that implements the <a href="http://php.net/apc">APC</a> functions in PHP and some examples of it in use: saving objects, fetching data from the cache and removing things from the cache.
</p>]]></description>
      <pubDate>Thu, 15 Sep 2011 08:29:14 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Cache Data in RAM with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16441</guid>
      <link>http://www.phpdeveloper.org/news/16441</link>
      <description><![CDATA[<p>
DevShed has posted a new article in their series looking at storage interfaces and how to use them. In <a href="http://www.devshed.com/c/a/PHP/Implementing-a-Cache-System-in-PHP/">this latest article</a> they show how to create a caching layer that will allow you to work with any sort of caching backend you'd like.
</p>
<blockquote>
As with other elements of object-oriented programming, it's possible to use segregated interfaces in a great variety of scenarios and conditions and, therefore, enjoy the benefits that they provide right out of the box. [...] My goal in this article is to create an extendable caching system based on the contract defined by a segregated interface. To achieve this, the first step we need to take is to create the interface in question.
</blockquote>
<p>
He shows how to create the "CacheableInterface" that provides the structure for the child interfaces to follow. It provides methods for setting, getting, deleting and checking to see if a key exists. They illustrate its use with an interface to an APC cache, a file caching and a class that uses dependency injection to define the interface to use. 
</p>]]></description>
      <pubDate>Wed, 08 Jun 2011 10:48:23 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Zend Developer Zone: Caching of Zend Framework application configuration file]]></title>
      <guid>http://www.phpdeveloper.org/news/16394</guid>
      <link>http://www.phpdeveloper.org/news/16394</link>
      <description><![CDATA[<p>
On the Zend Developer Zone today there's a new post showing how you can <a href="http://devzone.zend.com/article/14893-Caching-of-Zend-Framework-application-configuration-file">cache your application configuration file</a> to boost the performance of your Zend Framework application just a little bit more.
</p>
<blockquote>
If you think that you've done everything in terms of performance optimization of your Zend Framework-based project, I bet that your application configuration file was not included in that process. [...] Reason why I'm referring to application config is that its parsing is performed on every request, which is certainly unnecessary, as you don't make configuration changes very often. Solution is simple - cache it.
</blockquote>
<p>
He opts for an APC-based solution that, in the bootstrap, reads in the configuration file and caches it as a part of a custom Zend_Application object. Code is included for both the addition to the bootstrap and the custom class extending Zend_Application to handle the actual caching.
</p>]]></description>
      <pubDate>Fri, 27 May 2011 12:02:02 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Artur Graniszewski's Blog: Drupal 7: HipHop for PHP vs APC - benchmark]]></title>
      <guid>http://www.phpdeveloper.org/news/16362</guid>
      <link>http://www.phpdeveloper.org/news/16362</link>
      <description><![CDATA[<p>
<i>Artur Graniszewski</i> has written up a comparison of the performance of a standard Durpal 7 installation using <a href="http://php.webtutor.pl/en/2011/05/17/drupal-hiphop-for-php-vs-apc-benchmark/">HipHop versus APC</a> to handle the optimization of the application.
</p>
<blockquote>
There have been many suggestions on improving Drupal performance, some of them recommend the use of APC module, data caching, or even compilation of the entire system through HipHop for PHP. While the first two solutions have been successfully implemented, no one was able to perform the build process. After many battles with the the compiler and the Drupal code, I present you results of the first successful translation of Drupal 7 to C++ language
</blockquote>
<p>
He introduces the methods he used and the statistics of the platform (hardware) he tested with. He also includes the software used and compile commands used to create the compiled Drupal version. Included in the post are graphs showing CPU usage comparing the two types of testing (HipHop and APC) versus a normal PHP-based installation. It also briefly touches on concurrency levels and the different optimizations that could be made with the gcc compiler.
</p>]]></description>
      <pubDate>Thu, 19 May 2011 11:01:20 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Simas Toleikis' Blog: PHP data caching techniques]]></title>
      <guid>http://www.phpdeveloper.org/news/15566</guid>
      <link>http://www.phpdeveloper.org/news/15566</link>
      <description><![CDATA[<p>
<i>Simas Toleikis</i> has <a href="http://simas.posterous.com/php-data-caching-techniques">posted some caching techniques</a> he's come up with to handle a few different situations including simple file-level caching and working with memcached.
</p>
<blockquote>
Caching intermediate data is the most primitive and yet the most rewarding optimization technique where you don't need to fiddle with any complex algorithms or premature optimizations. If you are into PHP you should be aware of all the best practices and the right tools for this job to make your websites fly.
</blockquote>
<p>
He covers a few different, though common, situations you may come across in your application where caching could be very helpful:
</p>
<ul>
<li>Static scope variables
<li>APC shared memory functions
<li>Memcached for large distributed caches
<li>In-memory database tables
<li>Simple file-level caches
</ul>]]></description>
      <pubDate>Mon, 13 Dec 2010 08:45:10 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Till Klampaeckel's Blog: APC: get a key's expiration time]]></title>
      <guid>http://www.phpdeveloper.org/news/15417</guid>
      <link>http://www.phpdeveloper.org/news/15417</link>
      <description><![CDATA[<p>
<i>Till Klampaeckel</i> has shown off one of the "best kept secrets" about the APC caching tool that not many people seem to use - <a href="http://till.klampaeckel.de/blog/archives/124-APC-get-a-keys-expiration-time.html">getting a key's expiration time</a> that can be useful to tell other applications how long the data will be good for.
</p>
<blockquote>
APC offers a bunch of very useful features - foremost a realpath cache and an opcode cache. However, my favorite is neither: it's being able to cache data in shared memory. How so? Simple: use apc_store() and apc_fetch() to persist data between requests. The other day, I wanted use a key's expiration date to send the appropriate headers (Expires and Last-Modified) to the client, but it didn't seem like APC supports this out of the box yet.
</blockquote>
<p>
He includes a quick bit of sample code that defines an "apc_exire" function that grabs the expiration information as returned by apc_cache_info - the "ttl" and "creation_time" values.
</p>]]></description>
      <pubDate>Thu, 11 Nov 2010 11:28:55 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Zend Developer Zone: Using APC with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/15369</guid>
      <link>http://www.phpdeveloper.org/news/15369</link>
      <description><![CDATA[<p>
The Zend Developer Zone has published a new in-depth tutorial from <i>Vikram Vaswani</i> about <a href="http://devzone.zend.com/article/12618-Using-APC-with-PHP">using APC and PHP</a> to get the best performance out of your application. Using this opcode caching tool can greatly speed up the execution of your site with almost no effort on your part.
</p>
<blockquote>
dding APC to an application usually results in improved application response times, reduced server load and happier users. In this article, I'll introduce you to APC, guiding you through the process of installing and configuring it and showing you a few examples of how it works. I'll also walk you through the APC administrator interface, which lets you view APC performance in real time, and show you how you can use it with the Zend Framework
</blockquote>
<p>
He shows you every step of the way - installation, configuration (complete with some screenshots) and the web-based interface you can enable to see the statistics about how the cache's performance is and what requests it's been handling. He mentions other abilities APC has like array and object caching, caching closures and finally a real-world example of using it to cache the results of a Twitter search request (in a Zend Framework environment).
</p>]]></description>
      <pubDate>Tue, 02 Nov 2010 11:51:44 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[IBuildings techPortal: Understanding APC]]></title>
      <guid>http://www.phpdeveloper.org/news/15244</guid>
      <link>http://www.phpdeveloper.org/news/15244</link>
      <description><![CDATA[<p>
On the IBuildings techPortal today there's <a href="http://techportal.ibuildings.com/2010/10/07/understanding-apc/">a new tutorial</a> from <i>Vito Chin</i> that wants to help you understand what APC (the Alternative PHP Cache) is all about and get you on the road to using it in your application.
</p>
<blockquote>
<a href="http://uk2.php.net/manual/en/book.apc.php">APC</a> is a performance-enhancing extension. It should not be confused with a magic pill, although having it around does provide a positive impact on performance! If configured incorrectly, APC can cause unexpected behaviour, however when implemented optimally APC can be a useful weapon in your arsenal. In this post we will examine APC's capabilities and it's application both as an opcode cache and in its less common usage as a data cache.
</blockquote>
<p>
He starts off by comparing/contrasting it with <a href="http://uk2.php.net/manual/en/book.memcached.php">memcache</a>, nothing that APC is more targeted towards PHP and is more useful for caching smaller bits of information (like objects). He talks about the importance of using APC for an application, what the system really caches and some of the limitations that come with it. There's code snippets to help illustrate some of the points and the article is rounded out with a look at file caching, the time-to-live setting and how you can monitor your cache's health.
</p>]]></description>
      <pubDate>Thu, 07 Oct 2010 09:33:31 -0500</pubDate>
    </item>
  </channel>
</rss>

