Richard Grevers wrote:
One question to throw into the mix - If we cache
static pages for anonymous
(no skin preference)users (updating them when edited) rather than pulling
them afresh from the database, on which mahine should the static pages
I tried a middle way for susning.nu. The original UseModWiki source
code (0.92) has an option for HTML caching, but the way it is
implemented when any page is edited the entire cache is cleared, which
doesn't really scale beyond 1000 pages.
So in my case, in subroutine WikiToHTML, instead of calling
PageOrEditLink for every occurance of FreeLinkPattern, calls a new
subroutine PageOrBracketLink, that returns an HTML <a href> link if
the page exists but leavs the brackets in place if it doesn't exist.
This half-cooked format is stored in the cache. The only wiki markup
that remains to be evaluated on every access is the bracket links to
pages that didn't exist when the page was last edited.
This assumes that pages are never deleted, which is true in my case.
This works fine, at least as fine as not using caching. I cannot
really tell if it is any faster, but I don't think it's slower.
--
Lars Aronsson (lars(a)aronsson.se)
Aronsson Datateknik -
http://aronsson.se/