Re: [SMARTY-DEV] chache only based on lifetime??

From: Date: Wed, 14 Aug 2002 21:54:21 +0000
Subject: Re: [SMARTY-DEV] chache only based on lifetime??
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-243@lists.php.net to get a copy of this message
Testing for data freshness on every hit to the cache would kind of defeat the purpose of the cache, it would mostly be unnecessary processing. A better method is to not expire the cache at all, and remove the involved cached file(s) upon an update of your data (which you can do.) Then you will get the effect you want without a peformance penalty. Mattia wrote:
As I can see Smarty cache in arriving to sophisticated mechanism like {insert} and {dynamic}. But only in some cases. In other cases the caching mechanism remains poor. For example the caching mechanism is only based on lifetime! Imagine a forum or a guestbook: there's no reason to make the cache expire if none posted a new message. The cache could last several days or few minutes. This is not based on lifetime, but only on the freshness of your datas!! Mattia
-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.

« previous php.smarty.dev (#243) next »