O'Reilly logo

PHP 5 Power Programming by Derick Rethans, Stig Sæther Bakken, Andi Gutmans

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

11.6. Caching

PEAR offers two different packages for caching: Cache and Cache_Lite. As suggested by the name, Cache_Lite has a lighter design than Cache, and is designed to be faster at the expense of some flexibility and functionality.

11.6.1. Cache_Lite

The Cache_Lite package offers simple, fast, file-based caching. It is restricted to caching in files for speed and simplicity. Cache_Lite provides three types of caching:

  • Generic caching of any data

  • Caching of PHP output

  • Caching of function return values

The idea behind Cache_Lite is that you only need to load the Cache_Lite class to use it. It does not load the PEAR class unless needed in a raiseError() call, and not many other classes. If you are not using a PHP code cache, this package avoids ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required