Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Not deleting/invalidating cache

 
Post new topic   Reply to topic    Smarty Forum Index -> Installation and Setup
View previous topic :: View next topic  
Author Message
thapame
Smarty n00b


Joined: 22 Sep 2007
Posts: 4

PostPosted: Sun Nov 17, 2013 5:58 pm    Post subject: Not deleting/invalidating cache Reply with quote

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
View user's profile Send private message
thapame
Smarty n00b


Joined: 22 Sep 2007
Posts: 4

PostPosted: Mon Dec 23, 2013 4:38 pm    Post subject: Reply with quote

any ideas?
Back to top
View user's profile Send private message
kowach
Smarty Rookie


Joined: 26 Jan 2011
Posts: 8

PostPosted: Tue Aug 19, 2014 11:20 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Installation and Setup All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP