Hi, On Mon, Feb 6, 2012 at 10:27 PM, Christopher Smith <chris@xxxxxxxxxxxxx> wrote: >> I'm also wondering why the cache for all pages with backlinks is >> purged when the page is saved … > > I think its only purged for a page delete. The metadata is only purged for page delete, but I mean the xhtml renderer cache. See https://github.com/splitbrain/dokuwiki/blob/master/inc/common.php#L1048 I found that code while searching for metadata reloading code in the save function. > p_read_metadata() can't be forced to override its cache. Yes, but in fact that's a global array, so if we don't care about using kind of internal values in the save function, we could simply unset the cache directly in that global array. > p_purge_metadata() doesn't invalidate any cached copy. p_purge_metadata() is for removing metadata and p_save_metadata which is called in it does actually update that cache, but yes, it doesn't render metadata again as this function is thought for the case that the page has been deleted and thus won't be rendered anymore. > Its possible that metadata isn't read on a save. p_get_metadata might be ok, > testing required. If not, hacking of the metadata cache is required. Metadata is read relatively early in every request when pageinfo() is executed (which is in doku.php even before the DOKUWIKI_STARTED event which is also still before act_dispatch) so I assume it is read before the page is saved. Michael -- DokuWiki mailing list - more info at http://www.dokuwiki.org/mailinglist