public function __construct($feed, $id) { $cache_f = array('lifetime' => 60 * 60, 'automatic_serialization' => true); $cache_b = array('cache_dir' => '/tmp'); $cache = Zend_Cache::factory('Core', 'File', $cache_f, $cache_b); if ($c = $cache->load($id . '_FM')) { parent::__construct(null, $c->saveXML()); $this->_base = $c; } else { try { parent::__construct($feed); $this->_base = new Zend_Feed_Rss($feed); $cache->save($this->_base, $id . '_FM'); $this->_base->__wakeup(); } catch (Zend_Feed_Exception $e) { } } }