Re: [SMARTY] Problem with clear_cache and cache groups
messju mohr <[email protected]> Thu, 31 May 2007 15:02:41 +0200
| Newsgroups | gmane.comp.php.smarty.general |
|---|---|
| Message-ID | <[email protected]> |
On Thu, May 31, 2007 at 02:24:56PM +0200, Francesco Cipriani wrote:
> > I'm using smarty 2.6.18, I've just upgraded from smarty 2.5 (...).
> > I'm using clear_cache to clear cache groups, it did work with smarty 2.5
> > but now it doesn't work anymore.
>
> Trying every available release, I found that the latest version able to
> clear my group caches is 2.6.1.
So you think this regression came into smarty 2004-02-17 (release of
2.6.2) and you are now the first one who uses cache groups and
encounters this bug?
> But it not compatible with php5 (I have:
> "Fatal error: using $this when not in object context").
> To test the releases I used the following code
>
> <?php
>
> require('lib/smarty/libs/Smarty.class.php');
>
> $tpl = new Smarty();
> $tpl->cache_dir = "/var/www/localhost/htdocs/test/cache";
> $tpl->compile_dir = '/var/www/localhost/htdocs/test/templates_c';
>
> $res = $tpl->clear_cache(null, "latest");
> echo ($res ? "true\n" : "false\n");
>
> ?>
your example works fine for me with 2.6.18 and with CVS head.
in your first mail you asked how you can debug it: use a single step
debugger like xdebug or dbg. if you cannot or do not want to use a
debugger add echo statements into your cvs checkout of smarty to trace
where the code flows and to see where it does not flow the way you
expect it to flow.
greetings
messju
> The root of the cache group is "latest".
> Versions until 2.6.1 work, newer not, all things being the same.
>
> --
> Francesco
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php