[pmwiki-users] pagelists link= with pages generated externally
Patrick R. Michaud
pmichaud at pobox.com
Tue May 22 08:40:27 CDT 2007
On Tue, May 22, 2007 at 02:55:29PM +0200, Christophe David wrote:
> I am using beta 49, and have wiki pages created dynamically from
> external applications (say "Group1.Name1", Group1.Name2, etc.), and a
> simple (:pagelist group=Group1:) fails to list them.
>
> Deleting .pageindex does not help.
>
> When creating a page with PmWIki in Group1, pagelist sees it.
>
> Could you please explain how (:pagelist:) works internally in order to
> take the neccessary steps to get externally generated pages listed ?
That's a pretty large question... pagelist is by far the largest
subsystem within PmWiki, and undoubtedly the most complex. The
basic algorithm is straightforward -- simply loop through all of
the available pages and filter out any that don't match whatever
criteria are presented. It's the speed optimizations such as
indexing and caching that add complexity and dependencies.
> Are the caching options related somehow ?
Yes. In this case I suspect it's not the .pageindex that is the
culprit but the pagelist cache. (A simple group=Group1 query
doesn't use .pageindex at all.) So, are you running with pagelist
caching enabled? If yes, then the problem is that PmWiki can't
see that a page has been created by an external program, and
therefore doesn't realize that the pagelist cache it's already
created is invalid.
PmWiki keeps a file (normally "wiki.d/.lastmod") that indicates
the time of last modification to any pages on the site. The
various caches in PmWiki then use this to determine when something
has changed and thus invalidate the cache.
So, whenever your external program creates a new page, it
probably needs to update the ".lastmod" file as well. This
can be as simple as
touch wiki.d/.lastmod
The contents of the .lastmod file don't matter -- PmWiki just
uses the file's "last modified" timestamp.
Pm
More information about the pmwiki-users
mailing list