Home arrow Zend arrow Page 6 - Improving Performance

Caching conditions - Zend

Your web presence is growing! Traffic and usage are escalating and you have to maintain a superior level of performance. The state of growth unfolds many opportunities but it also holds challenges as a result of change. Not only does performance affect your operating costs, it also reflects directly on the end-user experience. The marketing and sales departments are probably saying that happier users directly increase sales.

TABLE OF CONTENTS:
  1. Improving Performance
  2. Static and Dynamic Web content
  3. Reverse Proxy cache
  4. Code caching (Acceleration)
  5. Client-side caching
  6. Caching conditions
By: Zend
Rating: starstarstarstarstar / 8
January 08, 2004

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Some sites use various parameters to recognize which version of the same page to serve. For example, the 'Request' parameter can be set so that it serves the appropriate page for Internet Explorer and Netscape browsers.

Full Page caching with conditions allows you to save distinct output based on the requesting URL query string or parameters such as: Get, Cookie, Request, Server and Session. Caching conditions can also be used to determine whether or not to serve identical requests from the cache. For example, Zend.com has some pages that should be only cached when the end-user is not logged in. When the end-user is logged in, Zend.com sets a cookie named Zend_In, signifying that the user has logged in. A caching condition can be set to cache the relevant pages only when the user is not logged in, in other words, 'Zend_In' is not set: -COOKIE:Zend_In.

It is important to note that some pages cannot be cached at all. Server-side script pages that process information submitted via an HTML form must be executed for every request and should never reside in a Web content cache. It may be useful to cache the form itself, especially if fields are populated from a database table.

Partial page caching
Partial caching provides greater flexibility and control for pages that contain both static and dynamic content. By selecting portions of the page to cache, only relevant parts of the page are cached while the dynamic content remains untouched.
Storefront 
Imagine the above store page containing current campaigns, general navigation, store navigation, Featured categories and My account including the shopping cart information. The entire page is static information collected from four database queries, except the My account section, which calls another database query. By caching the static queries and dynamically processing only the My account query, it is possible to save 80 percent of the original work for displaying the page.

Compression
Some server-side dynamic content caching solutions also implement page compression. This functionality removes all the remarks and white space inside the HTML that is sent to the clients. Additionally, the file can be zipped, reducing its size by as much as 80%. Compressed pages download much faster and further enhance the user's experience.

Conclusion
Performance improvement is the first step in the cycle of growth. Even by itself it is a broad statement encompassing many concerns for network elements, each one calling for a different solution. As your site growth and you go through the growth cycle you will add to and modify your infrastructure. At each point, choose among the various caching solutions depending on the type of data your site servers and the location of the bottleneck.



 
 
>>> More Zend Articles          >>> More By Zend
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

ZEND ARTICLES

- Taking the Zend Certified PHP Engineer Exam:...
- Quick Introduction to PHP 5
- PHP SOAP Extension
- Improving Performance
- PDFs with PHP part 2
- PDFs with PHP part 1
- PHP at Lycos
- Build Database Interfaces

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: