Should $this->compile_check logic check the timestamp of parent & included php files?
| From: | Robert V. Zwink | Date: | Tue, 28 May 2002 18:42:30 +0000 |
| Subject: | Should $this->compile_check logic check the timestamp of parent & included php files? | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-4416@lists.php.net to get a copy of this message | ||
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.