/** * Save a specified feed object corresponding to given parameters to the * cache */ protected function _cacheSaveFeed(GenericXmlSyndicationFeed $feedObj, $feed, $format, $params) { $filename = $this->_cacheFilename($feed, $format, $params); $cacheContent = array('content-type' => $feedObj->contentType, 'content' => $feedObj->getContent(false)); file_put_contents($filename, serialize($cacheContent), LOCK_EX); }