30.07.2012 Views

Reference Guide

Reference Guide

Reference Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Zend Server <strong>Reference</strong> Manual<br />

Cache<br />

Working with Caching<br />

This procedure describes the different caching capabilities available to you when using Zend Server.<br />

Caching is the process of storing data or pre-rendered web output that can dramatically reduce the time<br />

to present results to the users.<br />

The available caching capabilities are:<br />

142<br />

Data Cache API<br />

Zend Framework Cache API (External Link)<br />

Page Cache<br />

API versus Interface<br />

The first step in choosing a suitable caching option is to discern who should be setting-up the caching.<br />

The decision what caching option to use, is also based on the type of content you are interested in<br />

caching. Any long running operations such as query results, can be cached using an API as long as the<br />

information is relatively static (i.e. does not frequently change). For example if you are using a web<br />

service to collect weather information you can use the API to cache the information and refresh every<br />

few hours and gain a performance boost without compromising the accuracy of your information. When<br />

planning to develop a PHP application, long processes should be pinpointed in advance in order to<br />

implement caching in an early stage.<br />

On the other hand if you have entire web pages that include static content such as home pages, online<br />

stores and catalogs you can cache the entire page using the Page Cache. When you have pages that<br />

include a mixture of static information and personalized information you can in essence cache per user<br />

but that should be done carefully as it may cancel out the caching performance gain.<br />

The last point in deciding is, ease of use. Using the Data Cache and the Zend Framework Cache API<br />

requires programming skills to insert the API in the code and a deep knowledge of how the PHP<br />

application works. Page Caching also requires a deep understanding of how the PHP application works<br />

but does not require any programming skills and the entire caching process can be done from the Zend<br />

Server Administration Interface (Rule Management | Caching).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!