Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Caching Hat-trick: Zend Opcache, Etags and Query Caching
Jul 13, 2015 @ 14:57:56

The SitePoint PHP blog has posted three tips on caching that can help speed up your application from the processing level up. The article shares tips on using opcode caching for faster processing, etags for web request caching and query caching on the data side.

In this article, we will be looking at some of the common caching techniques in PHP: Opcache, Expires Headers and Query Caching in MySQL. We’ll look at additional approaches in part 2.

He starts with an introduction to the request lifecycle of a typical request made to a PHP-based application, from the fetching of a file to the actual execution. This lays the groundwork for the first kind of caching: opcodes for caching execution results. He helps you get that enabled and configured and shows how to determine how much it's actually helping. Following this he talks about the "expires" headers you can send from Apache, telling the browser exactly when it needs to fetch new versions of things like CSS, image or Javascript files. Finally he touches on MySQL query caching, storing the already parsed version of a query on the server with results in a cache for faster polling on repeated requests.

tagged: caching zend opcode etags expires query caching tutorial speed performance

Link: http://www.sitepoint.com/caching-hat-trick-zend-opcache-etags-and-query-caching/


Trending Topics: