Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Caching problem (pages stay beeing cached)
Goto page Previous  1, 2
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
Scott
Smarty Rookie


Joined: 18 Apr 2003
Posts: 10
Location: Sarasota, FL

PostPosted: Tue Aug 26, 2003 5:29 pm    Post subject: consider using cache groups Reply with quote

We use cache groups based on a unit_id (unique key number for each user). When their profile is updated, we simply clear the cache for only that group. To make testing/debugging easier, we add the ID type with the group name:

During the DB 'update' this code is executed to clear the cache for only that specific unit_id:

Code:

      // clear cache for this unit, since we are saving new changes.
      $my_cache_id = $_SESSION['self']['sub_id'] ."-". $the_unit_id;
      $smarty->clear_cache('unitsummary.tpl', $my_cache_id);


so, by looking in the cache directory, we can easily tell which profiles are cached, and which are not.

hope this helps!

Scott
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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