[Pmwiki-users] 404 Caching Cookbook

Crisses crisses
Thu Jul 1 03:56:57 CDT 2004


On Jun 30, 2004, at 6:50 PM, Evan Prodromou wrote:

> So, I finally got around to writing my 404-handler caching cookbook
> recipe. Comments and criticism welcome.
>
>         http://www.pmwiki.org/wiki/Cookbook/FourOhFourCache
>
> Note: experimental, use with caution. I've noticed a considerably
> snappier response for cached pages, and I think this might become quite
> useful.

I haven't tried this one yet.  But I did try the other caching script 
and found that the authentication check made it untenable.  When it did 
need to generate a huge page such as AllRecentChanges it took it about 
4 times longer than it did to generate the page.  And expiring ALL 
pages any time one page changed was another problem.

I think one thing this script would have to do is spin off a sed script 
that adds a password to the .htaccess password for the page if the page 
in question is passworded.  It will have to search to see if the 
password for that page is already entered in the .htaccess file.  If it 
isn't, it will need to add it.  For that matter, if a page is changed 
so that it's unpassworded, the opposite must take place: if it finds 
it, it needs to strip the password line out.

I think this is better handled outside the wiki itself, although that 
introduces a potential vulnerability unless one is careful.  Double 
check that one is not caching pagenames with semicolons, otherwise a 
sed call becomes a potential vulnerability.

Crisses
-- 
Malcolm&:  Being a bit pessimistic today? i thought that was my job
Crisses: No, it's just that next to you I normally look like an 
optimist.




More information about the pmwiki-users mailing list