jpcache v2
November 27, 2007: Please read the frontpage, jpcache is no longer maintained by me...
April 3, 2005: Seems that after 2 years, I need to incorporate the patches users committed :) Just moved the site over to a new server, expect CVS-updates soon (in the upcoming weeks).
jpcache is a lightweight, full page caching system for PHP, thus
reducing server-load, as pages are generated less often.
It dramatically speeds up the serving of your pages, by caching the ouput of pages and returning them instead of compiling the php-page.
It also uses gzip content-encodig and ETag-headers, which results
in around 80% in traffic-saving for php-pages.
You can choose to store the cached output in files in a local dir or in a database.
jpcache has been released under the GNU Public License (GPL). If you are using jpcache on your site(s), please show your appreciation by putting a link back to this site.
Features:
Caches full php pages for <X> seconds
When not modified since last visit, sends 304 response
When modified or first visit, sends gzipped content if possible,
else uncompressed content
You can choose between file or MySQL based storage
Takes GET and POST data into account when caching
Requirements:
- PHP4.1.0+ with Zlib enabled
- And of course MySQL when using the sql-version
Quick usage:
Edit jpcache.php and change the includedir-setting to the path of the jpcache files
Edit jpcache-config.php and change the configurationsettings
Start your file with <? $cachetimeout=<X>; include "jpcache.php" ?>
Setting <X> to -1 will disable caching and will only do content encoding. This can be used for pages that are not cacheable due to user-specific content (polls, personalization etc.)
Please see the manual for a full overview of possible options.
Bug in IE6 widely reduces use of ETag
Please see my message in microsoft.public.windows.inetexplorer.ie6.browser
You can test it for yourself here. After refreshing the page, the IF_NONE_MATCH should be set, however, 2 IE6sp2 on XP I've tested with didn't!
This affects jpcache, as well as all other code that sends gzippped encoded content in combination with ETag-headers.
Can anyone confirm this bug ?
First version was based upon and inspired by phpCache.
|