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

Cacheing with URL parameters.

 
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
Yegg
Smarty Rookie


Joined: 16 Sep 2003
Posts: 6

PostPosted: Tue Sep 16, 2003 2:30 pm    Post subject: Cacheing with URL parameters. Reply with quote

A little example, I have a simple page with smarty template, there are include of template, like

{include file="1.tpl"}

but, depends on URL parameters, it will give different results, for example if id=1 one result, and if id=2 another, cacheing will save just first copy, and will not change it, until it will expire, I mean that if I will enter mypage.php?id=1 or mypage.php?id=2, the results will be the same with enabled cacheing, is there another way to say smarty to cache by URL, not by template name, or it's possible only with insert tag of smarty?

Thanks.
_________________
Sorry, for my bad english.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Tue Sep 16, 2003 4:06 pm    Post subject: Reply with quote

http://smarty.php.net/manual/en/caching.multiple.caches.php is what you want.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Yegg
Smarty Rookie


Joined: 16 Sep 2003
Posts: 6

PostPosted: Tue Sep 16, 2003 4:13 pm    Post subject: Reply with quote

But what about sessions id??? They R different for each user. In this way I need to use INSERT? To make dynamical this part's of page? Or there is another way?
_________________
Sorry, for my bad english.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Wed Sep 17, 2003 7:36 am    Post subject: Reply with quote

if you really want to display different content for different sessions than you have to use {insert} or turn off caching.
Back to top
View user's profile Send private message Send e-mail 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
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