|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
thapame Guest
|
Posted: Sun Nov 17, 2013 5:58 pm Post subject: Not deleting/invalidating cache |
|
|
Hi,
I am using Latest version of the smarty (3.1.15) including memcache plugin included within the demo directory.
My cache is using a groups, for example:
Code: |
$cache_id = "testgroup|some_page1";
$smarty->display($template, $cache_id);
|
But when I tried to delete/invalidate the cache using following code, it does not works (i.e. I get old contents):
Code: |
$smarty->clearCache(NULL, 'testgroup|some_page1');
|
However clearing all cache using following code is working properly:
Code: |
$smarty->clearAllCache();
|
Can anyone let me know what is wrong with my code or is this a bug?
Thanks |
|
Back to top |
|
thapame Guest
|
Posted: Mon Dec 23, 2013 4:38 pm Post subject: |
|
|
any ideas? |
|
Back to top |
|
kowach Smarty Rookie
Joined: 26 Jan 2011 Posts: 13
|
Posted: Tue Aug 19, 2014 11:20 am Post subject: |
|
|
I'v just came to same problem. There is no way to delete templates based on group/tag in Memache or APC plugin.
You could add 'testgroup' key tag, but then you have to search and delete it manually through native Memcache or APC functions.
$smarty->clearCache(NULL, 'testgroup|some_page1'); ignores second parameter, does nothing.
$smarty->clearAllCache(); clears all Memache or APC on server, not just template cache. I don't want that. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|