[pmwiki-users] refresh/cache bug

Ben Stallings ben at interdependentweb.com
Tue Mar 13 09:06:40 CDT 2007


Pm replied to Dan:
> You don't need to update or refresh them -- simply invalidate the
> existing cache.
> 
>     global $PCache;
>     $PCache = array();
> 
> Since the entries no longer exist in the cache, PmWiki will look
> up and cache the new values as it needs them.

Or, rather than invalidating the whole cache, just clear the part you 
changed:

  global $PCache;
  unset $PCache[$pagename];

I ran into the same exact problem with DataQuery, which uses its own 
separate cache array to avoid the need for multiple queries when you do, 
say, a ls command followed immediately by a read command on every record 
that was just listed, as happens when you do a pagelist.  --Ben



More information about the pmwiki-users mailing list