Если кеширование включено, тогда дата изменения документа определеется smarty
Smarty.class.php
/**
* check If-Modified-Since headers
*
* @var boolean
*/
public $cache_modified_check = false;
....
if ($this->cache_modified_check) {
$_server_vars = ($this->request_use_auto_globals) ? $_SERVER : $GLOBALS['HTTP_SERVER_VARS'];
$_last_modified_date = @substr($_server_vars['HTTP_IF_MODIFIED_SINCE'], 0, strpos($_server_vars['HTTP_IF_MODIFIED_SINCE'], 'GMT') + 3);
$_gmt_mtime = gmdate('D, d M Y H:i:s', $this->_cache_info['timestamp']).' GMT';
if (@count($this->_cache_info['insert_tags']) == 0 && !$this->_cache_serials && $_gmt_mtime == $_last_modified_date) {
if (php_sapi_name()=='cgi')
header('Status: 304 Not Modified');
else
header('HTTP/1.1 304 Not Modified');
} else {
header('Last-Modified: '.$_gmt_mtime);
echo $_smarty_results;
}
...
$this->_cache_info['template'][$resource_name] = true;
if ($this->cache_modified_check && $display) {
header('Last-Modified: '.gmdate('D, d M Y H:i:s', time()).' GMT');
}