[drupal-devel] [drupal-infrastructure] Drupal cache statistics

Gerhard Killesreiter killesreiter at physik.uni-freiburg.de
Wed Jun 1 13:10:46 UTC 2005



On Wed, 1 Jun 2005, Dries Buytaert wrote:

> On 01 Jun 2005, at 13:39, Gerhard Killesreiter wrote:
>
> >> 1. Rework loose caching to flush less frequently.
> >> 2. Flush partially.
> >>
> >>
> >
> > I am willing to continue to work on a partially flushing solution for
> > comments if you agree to make the custom PHP settings for blocks
> > return
> > an array of allowed paths instead of just TRUE or FALSE.
> >
>
> I'm afraid that isn't a workable solution.

Why do you think so? Your current code is something like:

if (arg(0) == 'forum') return TRUE;
if (arg(0) == 'node') return TRUE;
return FALSE;

Why not:

return array('node/*' => TRUE, 'forum/*' => TRUE);

or

return array('node/*', 'forum/*');

and assume FALSE otherwise?

This would be similar to what is stored in the DB if you don't use PHP
but the more simple solution. Note that I am only caring for the
$user->uid == 0 case as this is what we cache for. Role based setups
wouldn't be affected (for roles other than rid == 1).

Cheers,
	Gerhard




More information about the drupal-devel mailing list