[pmwiki-users] Speedy search?

pcoud at free.fr pcoud at free.fr
Tue Feb 21 10:56:48 CST 2006


Patrick R. Michaud wrote :


>>
>>
>>Heh, I was just thinking about a cache myself...  :-)   Perhaps we
>>could add a cache= option to pagelist, which allows an author to
>>specify a name under which the resulting output is to be cached.
>>(The cache is then invalidated by any page update.)
>>
>>One of the problems with a cache is that it's mutually exclusive
>>with $EnablePageListProtect, unless we assume that read-protected
>>pages will never appear in the output (even if the person is
>>authorized to read them), or don't cache any results that have
>>read-protected pages.
>>


IMHO, a cache is a strong requirement for pmwiki, given its rich markup which
raise a high load on page generation.

I'm aware of the coherency difficulties : a cache system for pmwiki would not be
trivial due to the dynamic aspect (page includes etc.),
but with some assistance by the page author (author-provided hints) it should be
manageable: not every page do (:include:) or similar, most menus remains static,
and pages are typically much more often read than they are written, so it seems
a big waste of ressource to translate the markup on each page access.
- depending on the caching policy, page output could be always cached, except
for explicitely excluded pages, or page output could be cached only for
explicitely mentionned pages, with hints like (:cache:) (:nocache:)


>>
>>Indeed, this is the generic problem with any sort of caching in
>>PmWiki -- pages can be dynamic depending on the identity of the
>>visitor.  I keep brainstorming ideas about good ways to achieve
>>caching, but so far nothing great has appeared.
>>

Then a simple configurable option would be welcomed : I would happily trade-off
visitor sensitive content for a cache, at least for high traffic sites.

Also, may be an alternative caching approach which would work with visitor
dependant content would be not to cache on a per-page basis, but on a finer
unit: on calls to MarkupToHTML for example. However, tagging cache entries
would  then not be obvious, as hashing the source markup would be both pretty
expensive and lead to potential hash collision. This is an interesting problem
:-)...

P.




More information about the pmwiki-users mailing list