Re: [SMARTY] Why doesn't this work

From: Date: Sun, 10 Aug 2003 13:52:48 +0000
Subject: Re: [SMARTY] Why doesn't this work
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10031@lists.php.net to get a copy of this message
On Sunday, August 10, 2003 8:41 AM +0200, Avi Schwartz wrote: > Thank you very much for the clear explanation. I will have to be very > careful what I cache and how I cache. For now I will keep the cache > off since I am in the development phase anyway. yap... but be careful with URLs, I could just easily fill your server's harddisk by doing http://www.foo.de/?bar=1, http://www.foo.de/?bar=2 etc... (or append any nonsense parameter to the end of the url)... I usually do it the following way, lets take news as an example, those following are the cache ids: news|list|<categoryid> news|single|<categoryid>|<newsid> and then I delete the caches in the administration interface code... so if I change news #25, I delete cache news|single|<categoryid_of_news_#25>|25, and then I check if the news is appearing on the list (i.e. if it's one of the ten latest news or something) and if so, I delete the cache group news|list|<categoryid_of_news_#25> as well... and if I change something to a category itself, e.g. rename it or assign another picture to it, I just remove caches news|list|<categoryid> and news|single|<categoryid> more on this topic here: http://smarty.php.net/manual/en/caching.groups.php > I am starting to like Smarty very much. I am in the process of > evaluating the possibility of PHP and Smarty becoming our platform for > future development and as part of this process I am converting few > pages which were developed using Coldfusion. I love having the > ability to cleanly separate the presentation layer from the business > logic layer. Suddenly pages that were almost unreadable due to the > mixing of HTML and CF tags become so much easier to work with that > this is just amazing. hehe yeah... that's what I like so much, too... I just assign arrays of raw data to the template... things like date formatting and stuff isn't done in the PHP code anymore, but in the Smarty templates... unfortunately, a lot of people don't use Smarty this way ;/ Greets, David

« previous php.smarty.general (#10031) next »