На Joomla 1.5 заработало

в таком варианте:
То же самое для Joomla 1.5:
в файле \libraries\joomla\environment\response.php сразу после public static function sendHeaders()
после:
function allowCache($allow = null)
{
if (!is_null($allow)) {
$GLOBALS['_JRESPONSE']->cachable = (bool) $allow;
}
return $GLOBALS['_JRESPONSE']->cachable;
}
вставляем:
function getDBlm($row_lm,$tab_lm,$query_lm,$id_lm)
{
$db = &JFactory::getDBO();
$query = "SELECT `$row_lm` FROM `$tab_lm` WHERE `$query_lm` = '$id_lm'";
$db->setQuery($query);
$select_lm = $db->loadResult();
return $select_lm;
}
меняем содержимое
if (JResponse::allowCache() === false)
{
JResponse::setHeader( 'Expires', 'Mon, 4 April 2015 00:00:00 GMT', true ); // Expires in the past
JResponse::setHeader( 'Last-Modified', gmdate("D, d M Y H:i:s"). ' GMT', true ); // Always modified
JResponse::setHeader( 'Cache-Control', 'no-store, no-cache, must-revalidate', true ); // Extra CYA
JResponse::setHeader( 'Cache-Control', 'post-check=0, pre-check=0', false ); // HTTP/1.1
JResponse::setHeader( 'Pragma', 'no-cache' ); // HTTP 1.0
}
на
if(JRequest::getVar('view')=='frontpage')
{
$id_lm = '6';//ставим id cвоего материала на главной
}
elseif(JRequest::getVar('id')){
$id_lm = JRequest::getVar('id');
}
else{
$lastmodsite = gmdate("D, d M Y H:i:s").' GMT';
};
if($id_lm){
//Запрос к функции класса запрос к БД
$result = JResponse::getDblm('modified','#__content','id',$id_lm);
//Разбиваем на значения
$year_lm=substr($result, 0, 4);
$mount_lm=substr($result, 5, 2);
$day_lm=substr($result, 8, 2);
$time_lm=substr($result, 10, 9);
//Переводим в UNIX-формат и получаем текстовые значения дня и месяца
$time_lm_unix_in = $year_lm.'-'.$mount_lm.'-'.$day_lm.' '.$time_lm;
$day_lm_unix = date('D',strtotime($time_lm_unix_in));
$mount_lm_unix = date('M',strtotime($time_lm_unix_in));
//Сохраняем значение для поверки If-modified-since
$select_lm = strtotime($time_lm_unix_in);
//Формируем last-modified
$lastmodsite = $day_lm_unix.', '.$day_lm.' '.$mount_lm_unix.' '.$year_lm.' '.$time_lm.' GMT';
};
if(isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE'])>=$select_lm){
header($_SERVER['SERVER_PROTOCOL'].' 304 Not Modified'); exit; }
JResponse::setHeader( 'Expires', 'Mon, 1 Jan 2001 00:00:00 GMT', true );
JResponse::setHeader('Last-Modified',$lastmodsite,true);
JResponse::setHeader( 'Cache-Control', 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', false);
JResponse::setHeader( 'Pragma', 'no-cache' );
Огромное спасибо fox7812 и alexxsav!