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

A little tip for cache id based on REQUEST_URI

 
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 -> Tips and Tricks
View previous topic :: View next topic  
Author Message
lstelie
Smarty Rookie


Joined: 17 Oct 2003
Posts: 9
Location: Paris France

PostPosted: Tue Dec 30, 2003 10:47 am    Post subject: A little tip for cache id based on REQUEST_URI Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
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 -> Tips and Tricks 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