[pmwiki-users] Speed up PmWiki
Petko Yotov
5ko at free.fr
Thu Aug 16 21:48:44 CDT 2007
On Wednesday 15 August 2007, Patrick R. Michaud wrote:
>
> > 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.
>
> IMO, using time limits on caches really isn't useful here. First, it
> greatly reduces the odds of a cache hit (i.e., we only receive a benefit
> when a page is hit more than once every X minutes).
True, but if we do have less than one hit every X minutes, even old/slow
servers could handle the load.
> Second, it's not
> needed, since we already have superior methods to determine when the
> cache is invalidated (i.e., we can invalidate things based on a new
> posting).
I meant this way we can even eliminate a stat() on the second file (.lastmod)
during the slashdotting, and only do it once every 5 minutes.
>
> > 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.
>
> Which cookie?
I was thinking of the cookies PHPSESSID, $CookiePrefix.'author' and
$CookiePrefix.'imstime'. If they are not sent by the browser, the visitor is
very probably a non-identified reader and any (:if auth edit:) and other
personnalized content are not applicable to him, so, the output of PmWiki for
him is cacheable and reusable. If there is a valid cache, we can even not at
all call pmwiki.php.
Petko
More information about the pmwiki-users
mailing list