RE: [SMARTY] Should $this->compile_check logic check the timestamp of parent & included php files?

From: Date: Wed, 29 May 2002 15:16:04 +0000
Subject: RE: [SMARTY] Should $this->compile_check logic check the timestamp of parent & included php files?
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-4429@lists.php.net to get a copy of this message
> What's contained in your PHP files > should have no relevance to what's cached. For the most part when I change a MySQL query within a PHP page it will have an impact on the generated Smarty output. If I change the MySQL query within an included php page it can also affect the Smarty output. We needed to change a MySQL SELECT statement to only select LEFT(field, 255) for performance reasons. This had an effect on records with fields longer than 255. I might find a bug that when fixed could affect the generated output. The problem now is that when the bug is fixed, the cache persists. It becomes possible to have Smarty generated output of a php script persist even though the script would no longer generate the same output. We don't neccesarily want to purge all of the cached files when we update a page, we only want to destory the cached output that could have been affected by the change. If we change a php page that generates output that is cached why would we not want to update the cache when the php files are updated? The Smarty class example is perfect, if I update the smarty class file, why wouldn't I want to update all affected cache. They might end up being exactly the same, but if there is a chance they would be different, it seems ideal to have them updated immediately. -Rob Z. -----Original Message----- From: Peter Bowyer [mailto:reywob@f2s.com] Sent: Wednesday, May 29, 2002 10:51 AM To: Robert V. Zwink; Ben Godfrey; smarty-general@lists.php.net Subject: RE: [SMARTY] Should $this->compile_check logic check the timestamp of parent & included php files? At 10:41 29/05/02 -0400, Robert V. Zwink wrote: >But if "Smarty.class.php", "Another.class.php", or "template.php" >is updated >the is_cached() method will still return true because Smarty currently does >not test the timestamp of the parent or included php files to determine if >the cache should be expired. But that's the correct behaviour. What's contained in your PHP files should have no relevance to what's cached. If the Smarty class changes then it shouldn't clear the templates as it has nothing much to do with the HTML output. Peter. --oOo-- Narrow Gauge on the web - photos, directory and forums! http://www.narrow-gauge.co.uk --oOo-- Glenbranter - Scottish narrow gauge in 009 http://glenbranter.narrow-gauge.co.uk --oOo-- -- Smarty General Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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