1 (edited by gorsan 2009-02-28 21:47)

Topic: Cache the whole forum - jpcache for punbb

i tested it works great ,drops load really alot. I want to see this as a default punbb option

read details at

Re: Cache the whole forum - jpcache for punbb

We may look into something like this. We have a feature on the future plans to have a feature so the forum dosnt stop working if there is no database connection. so this might be an option.

Sorry. Unactive due to personal life.

3 (edited by gorsan 2009-03-01 00:06)

Re: Cache the whole forum - jpcache for punbb

this is my method to do things
after uploading files and making correct jpcache path things
i do this for the each files i want to cache (index.php viewforum.php viewtopic.php even search.php and userlist.php)

after require PUN_ROOT.'include/common.php';

if ($pun_user['is_guest']) {
} else {

and my header.php is (only the header part)

if ($pun_user['is_guest']) {

// Send no-cache headers
header('Expires: Thu, 21 Jul 1977 07:30:00 GMT');    // When yours truly first set eyes on this world! :)
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');        // For HTTP/1.0 compability

else if (!$pun_user['is_guest'])  {
header("Date: ".gmdate("D, d M Y H:i:s", time())." GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s", time())." GMT");;
header("Expires: ".gmdate("D, d M Y H:i:s", time() + 5)." GMT"); 
header("Cache-Control: public,must-revalidate,max-age=5"); 

$if_modified_since = preg_replace('/;.*$/', '', $HTTP_IF_MODIFIED_SINCE);

$mtime = time() + 5;
$gmdate_mod = gmdate('D, d M Y H:i:s', $mtime) . ' GMT';

if ($if_modified_since == $gmdate_mod) {
    header("HTTP/1.0 304 Not Modified");
//header("Last-Modified: $gmdate_mod");


oh one more thing i am not gzip ing pages from punbb options i did it from .htaccess
i am not sure if this works if i gzip from punbb options.

Re: Cache the whole forum - jpcache for punbb

if you could change punbb url system


jpcache would cache much lesser pages (caching every post is nonsense)