|
From: Francesco Cipriani on 29 May 2007 12:15 Hello, 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. Smarty's config and file permissions should be ok because clear_all_caches works correctly, but if I do a clear_cache("group1") it doesn't delete the cache for the page I displayed using $tpl->display("mytpl", "group1|group2"); The call to clear_cache returns true... but the files are still in their directories. I'm using php 5.2.2 on gentoo linux with apache2. How can I debug (and fix) this?? -- Francesco
From: Francesco Cipriani on 29 May 2007 13:02 Tuesday May 29 2007, at 18:37, Danilo Buerger wrote: > $cache_id is the second parameter. You're right, I did a mistake typing, I'm using clear_cache(null, "group1") and I've been using this call for years, now I've upgraded php and smarty, and something isn't working (but clear_all_caches works!) I cleared all the compiled tpls and caches (and verified that the dirs were empty) after the upgrade. I noticed that if I use a non existant cache-id, clear_cache returns true too, and this sounds strange to me Francesco
From: Monte Ohrt on 29 May 2007 12:39 Did you clear all cache and compiled files upon upgrade? Francesco Cipriani wrote: > Hello, > 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. Smarty's config and file permissions > should be ok because clear_all_caches works correctly, but if I do a > clear_cache("group1") it doesn't delete the cache for the page I > displayed using $tpl->display("mytpl", "group1|group2"); > The call to clear_cache returns true... but the files are still in their > directories. > I'm using php 5.2.2 on gentoo linux with apache2. > How can I debug (and fix) this?? > >
From: Francesco Cipriani on 31 May 2007 08:24 > 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. 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"); ?> The root of the cache group is "latest". Versions until 2.6.1 work, newer not, all things being the same. -- Francesco
From: Francesco Cipriani on 31 May 2007 08:45 > Trying every available release, I found that the latest version able to > clear my group caches is 2.6.1. I found it! It was use_sub_dirs!! Until 2.6.1 it was set to true by default, then it was changed to false. I had a script which displayed smarty tpls with use_sub_dirs set to true, and another script which cleared caches but didn't set that var which remained to false, but until 2.6.1 all worked because of the default. -- Francesco
|
Next
|
Last
Pages: 1 2 Prev: Assign by ref issue Next: [Fwd: Re: [SMARTY] Problem with clear_cache and cache groups] |