Home arrow PHP arrow Page 9 - Caching With PHP Cache_Lite

Endgame - PHP

As Web applications become more and more complex, cleverdevelopers can use application-level caching to improve the performanceof their PHP scripts. This article shows you how, discussing the PEARCache_Lite class with examples that illustrate how it can be used in alive environment.

TABLE OF CONTENTS:
  1. Caching With PHP Cache_Lite
  2. The Food Chain
  3. Return Of The Jedi
  4. Digging Deeper
  5. In And Out
  6. Bits And Bytes
  7. No News Is Good News
  8. Cache Cow
  9. Endgame
By: icarus, (c) Melonfire
Rating: starstarstarstarstar / 22
June 06, 2003

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

And that's about all we have time for. In this article, I introduced you to the PEAR Cache_Lite class, a PHP class designed specifically to provide a robust caching mechanism for Web pages. I showed you how to configure the location and the lifetime of the cache, and demonstrated how to use the class to cache both static HTML content and dynamic PHP output. I also gave you a quick tour of the Cache_Lite class' two variants, the Cache_Lite_Output and Cache_Lite_Function classes, illustrating how they could be used to cache blocks of output and function return values, respectively. Finally, I wrapped things up with a real-world example, showing you how a cache can make a substantial difference when dealing with complex, XML-based applications like Amazon Web Services.

In case you'd like to learn more about the topics discussed in this article, you should consider visiting the following links:

Documentation for the PEAR Cache_Lite class, at http://pear.php.net/package-info.php?pacid=99

phpCache, a lightweight alternative to Cache_Lite, at http://0x00.org/php/phpCache/, and a tutorial on how to use it, at http://www.sitepoint.com/article/685

A comprehensive resource on the topic of Web caching, at http://www.web-caching.com/

An article discussing the benefits of caching your Web content, at http://www.ariadne.ac.uk/issue4/caching/

Using Amazon Web Services With PHP And SOAP, at http://www.melonfire.com/community/columns/trog/article.php?id=162

Until next time...stay healthy!

Note: Examples are illustrative only, and are not meant for a production environment. Melonfire provides no warranties or support for the source code described in this article. YMMV!



 
 
>>> More PHP Articles          >>> More By icarus, (c) Melonfire
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: