This class can be used to cache the output of PHP scripts in files.
It checks if a given cache file exists and is updated. If it is updated, it outputs the cached content. Otherwise it starts capturing the output of the current script.
When the script is done outputting the content to be cached, it should call the class again to check the cache. Then the class updates the captured output.
The class may cache nested scripts that output several blocks of content stored in different cached files and with eventually different expiration times.
This package also comes with a plug-in to cache output of pages generated with Smarty templates.
The class may also cache the serialized values of objects and other types of variables.