On PHPBuilder.com today Jason Gilmore has written up a new tutorial about using memcached distributed caching for better performance in your web applications.

You probably know one of the easiest ways to improve performance is by caching all or parts of a page. But what might not be so obvious is exactly how this is accomplished. As it happens, a great solution called Memcached makes it trivial to incorporate caching into your website with great effect. In fact, relied upon by some of the largest websites in the world, among them Facebook, Twitter, Zynga, and YouTube, Memcached has essentially become the de facto website caching solution!

He walks you through installing the memcache extension for PHP (from PECL) and includes a bit of sample code that caches some fetched MySQL results to to the memcache server. With the extension installed you’re just a few simple function calls away from better performance.