[pmwiki-users] deprecating PCache (Was: Re: PageLists of database contents)

Patrick R. Michaud pmichaud at pobox.com
Thu Oct 5 14:17:08 CDT 2006

On Thu, Oct 05, 2006 at 09:00:44PM +0200, Dominique Faure wrote:
> On 10/5/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> >On Thu, Oct 05, 2006 at 09:42:03AM +0200, Dominique Faure wrote:
> >> On 10/5/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> >> >
> >> >I don't think I'll do this for 2.2.  PageStores need to be
> >> >substantially redesigned anyway to handle non-ASCII
> >> >characters in filenames, and case-insensitive pagnames
> >> >on case-sensitive filesystems, and spaces in pagenames,
> >> >and a bunch of other things that need addressing.
> >> >So, if changing PCache and search are going to require
> >> >substantial modifications to PageStore, it'll probably
> >> >have to wait for 2.3 ...
> >> >
> >> >Besides, a deprecation cycle for $PCache would give
> >> >recipes an opportunity to migrate away from using
> >> >it before making a switch.
> >>
> >> Then, I would suggest that you could easily provide a kind of API to
> >> allow (core and) recipes to maintain page related information during
> >> the parsing instead of directly using $PCache for that -- in the same
> >> way you already designed the ParseArgs() function.
> >
> >It's not "easily provide" because a good API is likely to
> >depend somewhat heavily on the PageStore redesign itself,
> >which is the part I'm hoping to avoid for 2.2.
> >
> >Or, I could just state it this way for 2.2:  $PCache is
> >deprecated, so recipe authors should stick to using the
> >existing ReadPage/WritePage interface and not make use of
> >$PCache.  If there's something in PmWiki for which that's
> >not possible, contact me and we'll figure out how to make
> >it possible.
> >
> As a recipe author, I was just used to find $Pcache a convenient way
> to store page related temporary data, avoiding to maintain my own
> cache via recipe dedicated static variables or hidden globals (I'm
> talking for example, about the way I build the "Get code" link in the
> SourceBlock recipe). Anyway, I could easily make my recipe rely on
> their own storage when needed.

Well, perhaps I should rephrase then -- $PCache itself may not
be deprecated, but relying on PmWiki to fill in specific values
of $PCache might be -- i.e., PmWiki might choose to store
some things (especially ['=auth'] and ['=prop'] entries) in
different places or a different format.


More information about the pmwiki-users mailing list