RE: Deleting cache selectively
| From: | Andrei Zmievski | Date: | Mon, 19 Nov 2001 15:24:48 +0000 |
| Subject: | RE: Deleting cache selectively | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-1960@lists.php.net to get a copy of this message | ||
On Mon, 19 Nov 2001, Thomas Pundt wrote:
>
> On 16-Nov-01 Francesco Cipriani wrote:
> | The problem is that I can determine the page/cacheid used by
> | category.php but not by program.php, because program.php uses
> | function calls like $tpl->display("program.tpl", $idprog)
> | and I don't know in advance what the $idprog passed are.
> | I don't want to clear all the cache, and I'm looking for a method to
> | clear the cache produced only by program.php.
> | I tried $tpl->clear_cache("program.tpl") but with no result.
>
> Smarty-1.4.6 introduced a bug which made exactly this feature
> stopping to work. I had to patch Smarty.class.php (attached).
>
> Ciao,
> Thomas
>
> --
> Thomas Pundt -------------------------- http://rp-online.de/
> -----------------
> RP-Online Verlagsgesellschaft mbH | pundt@rp-online.de
> Blumenstrasse 28, D-40212 Duesseldorf | Schlossstrasse 42, D-40477 Duesseldorf
Content-Description: diff
> --- Smarty.class.php Mon Nov 12 12:54:22 2001
> +++ /home/toor/Smarty-1.4.6-snap/Smarty.class.php Mon Nov 5 22:24:16 2001
> @@ -413,7 +413,7 @@
> Function: clear_cache()
> Purpose: clear cached content for the given template and cache id
> \*======================================================================*/
> - function clear_cache($tpl_file = null, $cache_id = null, $compile_id = null
> )
> + function clear_cache($tpl_file = null, $cache_id = null, $compile_id)
You cannot have a non-default argument follow default ones.
-Andrei
* Ethernet n.: something used to catch the etherbunny. *