<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[PunBB Forums - Cache the whole forum - jpcache for punbb]]></title>
	<link rel="self" href="http://punbb.informer.com/forums/feed/atom/topic/21214/"/>
	<updated>2009-03-01T21:17:04Z</updated>
	<generator>PunBB</generator>
	<id>http://punbb.informer.com/forums/topic/21214/cache-the-whole-forum-jpcache-for-punbb/</id>
		<entry>
			<title type="html"><![CDATA[Re: Cache the whole forum - jpcache for punbb]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/125158/#p125158"/>
			<content type="html"><![CDATA[<p>if you could change punbb url system</p><p><a href="http://punbb.informer.com/forums/post/125119/#p125119">http://punbb.informer.com/forums/post/125119/#p125119</a><br />to<br /><a href="http://punbb.informer.com/forums/topic/21214/#p125119">http://punbb.informer.com/forums/topic/21214/#p125119</a></p><p>jpcache would cache much lesser pages (caching every post is nonsense)</p>]]></content>
			<author>
				<name><![CDATA[gorsan]]></name>
				<uri>http://punbb.informer.com/forums/user/13930/</uri>
			</author>
			<updated>2009-03-01T21:17:04Z</updated>
			<id>http://punbb.informer.com/forums/post/125158/#p125158</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Cache the whole forum - jpcache for punbb]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/125119/#p125119"/>
			<content type="html"><![CDATA[<p>this is my method to do things <br />after uploading files and making correct jpcache path things<br />i do this for the each files i want to cache (index.php viewforum.php viewtopic.php even search.php and userlist.php)</p><p>after require PUN_ROOT.&#039;include/common.php&#039;;</p><div class="codebox"><pre><code>if ($pun_user[&#039;is_guest&#039;]) {
  $cachetimeout=86400;
} else {
  $cachetimeout=-1; 
}
require_once(&quot;include/jpcache/jpcache.php&quot;); </code></pre></div><br /><br /><p>and my header.php is (only the header part)</p><div class="codebox"><pre><code>if ($pun_user[&#039;is_guest&#039;]) {

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


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

$if_modified_since = preg_replace(&#039;/;.*$/&#039;, &#039;&#039;, $HTTP_IF_MODIFIED_SINCE);

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

if ($if_modified_since == $gmdate_mod) {
    header(&quot;HTTP/1.0 304 Not Modified&quot;);
    exit;
}
//header(&quot;Last-Modified: $gmdate_mod&quot;);

}</code></pre></div><p>oh one more thing i am not gzip ing pages from punbb options i did it from .htaccess<br />i am not sure if this works if i gzip from punbb options.</p>]]></content>
			<author>
				<name><![CDATA[gorsan]]></name>
				<uri>http://punbb.informer.com/forums/user/13930/</uri>
			</author>
			<updated>2009-02-28T23:43:31Z</updated>
			<id>http://punbb.informer.com/forums/post/125119/#p125119</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Cache the whole forum - jpcache for punbb]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/125116/#p125116"/>
			<content type="html"><![CDATA[<p>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.</p>]]></content>
			<author>
				<name><![CDATA[Utchin]]></name>
				<uri>http://punbb.informer.com/forums/user/9648/</uri>
			</author>
			<updated>2009-02-28T21:52:13Z</updated>
			<id>http://punbb.informer.com/forums/post/125116/#p125116</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Cache the whole forum - jpcache for punbb]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/125115/#p125115"/>
			<content type="html"><![CDATA[<p>i tested it works great ,drops load really alot. I want to see this as a default punbb option</p><p>read details at<br /><a href="http://punbb.informer.com/forums/post/125114/#p125114">http://punbb.informer.com/forums/post/125114/#p125114</a></p>]]></content>
			<author>
				<name><![CDATA[gorsan]]></name>
				<uri>http://punbb.informer.com/forums/user/13930/</uri>
			</author>
			<updated>2009-02-28T21:46:48Z</updated>
			<id>http://punbb.informer.com/forums/post/125115/#p125115</id>
		</entry>
</feed>
