[pmwiki-users] Speed up PmWiki

Petko Yotov 5ko at free.fr
Wed Aug 15 00:37:10 CDT 2007


On Wednesday 15 August 2007, Patrick R. Michaud wrote:
> markups that depend on the visitor's identity
>   {$Author}
>   {$AuthId}
>   (:if auth:)
...
> markups that include pages or content that might not
> be available to all visitors
>   (:include ReadProtectedPage:)
>   {ReadProtectedPage$:PageTextVar}

I believe these above may and should be cached, for ordinary visitors, that 
are not identified and without any special permissions. These are supposed to 
be the enormous part of the visits, in a usual website configuration.

If I recall correctly, the (:title:) markup currently invalidates all cache, 
and that is unfortunate.

How about this: We can also design a special sort of super-short-time cache, 
which could store a HTML output (for non-identified visitors) for 5 minutes, 
and it could send this cache to the visitors without any other checks of 
permissions/last-modified pages/pagelists. 

This may even be done before calling pmwiki.php: just checking for our cookie, 
and if there isn't a cookie, and the cache is newer than 5 minutes, send the 
cache. If not, ask pmwiki for IMS, if not the same, buffer the output, cache 
it and send it to the visitor, or else, touch the cache file.

This way, even a Slashdotted site may be able to handle the load, because the 
complicated and CPU/disk expensive things are done only once in a while.

Thanks,
Petko

P.S. This is not my idea, I believe someone already suggested this approach a 
while ago on the mailing list.




More information about the pmwiki-users mailing list