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

I alway use : display.php?id=xxx how to cache ???

 
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
ewebzerg
Smarty n00b


Joined: 27 Apr 2003
Posts: 4

PostPosted: Sun Apr 27, 2003 9:01 am    Post subject: I alway use : display.php?id=xxx how to cache ??? Reply with quote

we alway use:
display.php?id=xxx
xxx is the record's id value.

how to cache display.php?id=1,display.php?id=2;display.php?id=3... to file cache ?? is it a good idea ?


Last edited by ewebzerg on Wed May 05, 2010 10:49 pm; edited 1 time in total
Back to top
View user's profile Send private message
Wom.bat
Smarty Pro


Joined: 24 Apr 2003
Posts: 107
Location: Munich, Germany

PostPosted: Sun Apr 27, 2003 10:31 am    Post subject: Reply with quote

use a cache-id like so:
$smarty->display("template.tpl", $_REQUEST["id"]);
I'd strongly recommend that you validate $_REQUEST["id"] before, and set a valid value if it's invalid... otherwise, someone can easily fill your server / quota by calling the URL with random "id" parameters
read http://smarty.php.net/manual/en/caching.php
there you can find everything you might want to know (it's a good idea to read the documentation _first_ anyway Wink)
Back to top
View user's profile Send private message
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