On Wed, Aug 15, 2007 at 07:37:10AM +0200, Petko Yotov wrote: > 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.
Assuming that we use the RewriteUrl method identified in PITS.00966 that bypasses pmwiki.php entirely -- this would mean there's no way to distinguish "ordinary visitors" from those with special permissions. Thus once a copy of the page is cached, all visitors would get the cached version. > If I recall correctly, the (:title:) markup currently invalidates all cache, > and that is unfortunate. The (:title:) markup invalidates caching of any page containing that directive (which isn't exactly the same as "invalidate all cache"). You're quite correct that this needs to be fixed somehow. > 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). 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). > 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? Pm _______________________________________________ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users