让time.xml每天生成一次
This commit is contained in:
parent
a702606cdd
commit
c3edc3f083
|
@ -266,6 +266,9 @@ class DataController extends Zend_Controller_Action
|
|||
* todo:实现xml的缓存,基于时间的缓存(每天)?基于元数据修改的缓存,每次导入后都重新生成一次。
|
||||
*/
|
||||
function timelineAction()
|
||||
{
|
||||
$fn="time.xml";
|
||||
if (!file_exists($fn) || (time()-filemtime($fn)>3600*24))
|
||||
{
|
||||
$dateformat="D M j Y G:i:s O";
|
||||
$md = new MetadataTable();
|
||||
|
@ -286,6 +289,7 @@ class DataController extends Zend_Controller_Action
|
|||
$fp=fopen('time.xml','w');
|
||||
fwrite($fp,$timexml);
|
||||
fclose($fp);
|
||||
}
|
||||
//$this->_helper->layout->disableLayout();
|
||||
}
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue