Cache DXped-Sources for 12h

This commit is contained in:
int2001
2024-02-18 07:44:03 +00:00
parent 7b9ddbdddf
commit 3df96b8006

View File

@@ -9,8 +9,13 @@ class Dxcalendar extends CI_Controller {
$data['page_title'] = "DX Calendar";
$url = 'http://www.ng3k.com/adxo.xml';
$rssdata = simplexml_load_file($url, null, LIBXML_NOCDATA);
$this->load->driver('cache', array('adapter' => 'file', 'backup' => 'file'));
$rssUrl = 'http://www.ng3k.com/adxo.xml';
if (!$rssRawData = $this->cache->get('RssRawDxCal')) {
$rssRawData = file_get_contents($rssUrl, true);
$this->cache->save('RssRawDxCal', $rssRawData, (60*12));
}
$rssdata = simplexml_load_string($rssRawData, null, LIBXML_NOCDATA);
// Get Date format
if($this->session->userdata('user_date_format')) {