[pmwiki-devel] Are page text variables cached?

marc gmane at auxbuss.com
Tue Nov 28 11:31:51 CST 2006


Patrick R. Michaud said...
> On Tue, Nov 28, 2006 at 09:57:00AM -0000, marc wrote:
> 
> > Part II is to help me understand the related code.
> > [...]
> > 
> > The first if statement seems to answer my question above. Is this doing 
> > what I think it's doing? Namely, caching all the page text vars for a 
> > page.
> 
> Yes.  Once PmWiki is asked to scan a given page for page text 
> variables, it caches any that it finds so that subsequent calls
> to PageTextVars for the same page don't require the read.
> (This is especially useful/important when page text variables
> are being used in pagelists.)

Ah, that's why you've already cached them.
 
> > Does '=' in ['=pagetextvars'] have a purpose, or is it simply a naming 
> > convention?
> 
> It's a naming convention to avoid conflicts with other page
> attributes being held in $PCache.

Check.

> > Is there a write-up about $PCache?
> 
> Not an official one, and I'd warn recipe and module writers away
> from using $PCache at the moment, especially w.r.t. page variables,
> since I'm likely to change it fairly radically before 2.2.0 is
> released.

<holds up hands> Not me, guv. I always prefer to use core functions to 
handle core variables, but it's useful to understand some of the more 
esoteric stuff when reading the code.

Thanks.

-- 
Best,
Marc




More information about the pmwiki-devel mailing list