[dokuwiki] Re: How to trace namespaces modification?
- From: "TNHarris" <telliamed@xxxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Tue, 21 Nov 2006 16:26:59 -0500
On Sun, 19 Nov 2006 12:42:44 +0100, "Samuele Tognini"
<samuele@xxxxxxxxxxxxxxx> said:
> Is page.idx always updated? I mean, Indexmenu uses search() function to
> find all DW pages; instead of this slow way, might i parse the
> page.idx without the risk that it's not updated by DW or ,in the worst
> case, be empty?
>
A new ID is added to page.idx when that page is viewed and
/lib/exe/indexer.php runs. When created inside the wiki, this usually
happens semi-automatically, since after saving the page the editor views
the page. Pages added outside the wiki will not be immediately
available, though.
So the safest way is to search the directories.
If you are going to hold page.idx open for a long time, you need to lock
the index. This is done by creating a directory named "_indexer.lock" in
the lock directory, /data/locks. (Remember to check for an existing lock
first.) Reading the index all at once with "file('page.idx')" might be
safe without locking -- someone who knows more about PHP could say
definitively.
-- tom
telliamed@xxxxxxxxxxx
--
http://www.fastmail.fm - mmm... Fastmail...
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
- Follow-Ups:
- [dokuwiki] Re: How to trace namespaces modification?
- From: Tognini Samuele
- References:
- [dokuwiki] How to trace namespaces modification?
- From: Samuele Tognini
Other related posts:
- » [dokuwiki] How to trace namespaces modification?
- » [dokuwiki] Re: How to trace namespaces modification?
- » [dokuwiki] Re: How to trace namespaces modification?
- [dokuwiki] Re: How to trace namespaces modification?
- From: Tognini Samuele
- [dokuwiki] How to trace namespaces modification?
- From: Samuele Tognini