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

From: Date: Wed, 29 May 2002 13:43:40 +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-4426@lists.php.net to get a copy of this message
Rob, Instead of adding functionality you could create a plugin for use with {insert} to include files. The output of an insert is not cached. This would be a slower solution, since you loose the caching on anything coming from those included scripts, but you could just use this technique until your includes are in a more stable state and then go back to using include. It's one way anyway. Ben Godfrey On Tuesday, May 28, 2002, at 07:42 PM, Robert V. Zwink wrote:
I am considering adding functionality to our implementation of Smarty, and I wanted to know what the disadvantages might be. The functionality I want to add is that when the parent php file, or the php files included with include() or require_once(), have been updated, Smarty would automatically expire the related cache files. My reasoning is that when one of our developers updates a php page, or a file that is typically included, the Smarty cache persists because the HTML template has not been updated. We don't necessarily want to delete _all_ of the cache when we send a change to our development servers. If I add functionality to check the timestamp of parent php files (and included files), the affected cached will automatically be regenerated. I'm considering using the php function get_included_files() during the $this->compile_check logic to get the last modified timestamp of all php (and included files) when testing whether not to expire the cache. Has this been addressed in the past? Is there a reason why the logic only checks the timestamp of the included templates and not the actual php pages? Do most people just purge the entire cache when php on the site is updated? Just curious, thanks for your time and a wonderful product. -Rob Z. -- Smarty General Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


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