|
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 |
lstelie Smarty Rookie
Joined: 17 Oct 2003 Posts: 9 Location: Paris France
|
Posted: Tue Dec 30, 2003 10:47 am Post subject: A little tip for cache id based on REQUEST_URI |
|
|
Hello
If you use the classical REQUEST_URI for the cache id you have perhaps a sharedhosting like the one I use where from time to time ?PHPSESSID=A_RANDOM_SEQUENCE_OF_CARACTERS is added to the URI scewing up you supberb cache organisation.
To avoid this
Code: |
$string = $_SERVER[REQUEST_URI];
$my_cache_id = ereg_replace("PHPSESSID=[^&]+&", "", $string);
if(!$smarty->is_cached('index.tpl',$my_cache_id)) {
|
Luc |
|
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
|