Re: [PRES] cvs: pres2 / show.php
| From: | Rasmus Lerdorf | Date: | Thu, 07 Nov 2002 05:21:56 +0000 |
| Subject: | Re: [PRES] cvs: pres2 / show.php | ||
| References: | 1 | Groups: | php.pres |
| Request: | Send a blank email to pres+get-497@lists.php.net to get a copy of this message | ||
> + // Determine if we should cache
> + $cache_ok = 1;
> + foreach($objs as $obj) {
> + if(is_a($obj, '_example')) {
> + if(strtolower($obj->type) == 'php') {
> + $cache_ok = 0;
> + }
> + }
> + }
> + reset($objs); // shouldn't be necessary, but is
I don't think that $obj->type == php check is appropriate here. You don't
want to cache if type is system either, for example. But if
$object->result is false, then you might be able to cache. Of course if
the example code is loaded in from an external file and $obj->hide is
false then you'd need to check that external file for a timestamp.
I think in the end you might as well just turn off caching if there is an
example tag at all.
-R