FeedCache
FeedCache copied to clipboard
Simple PHP class for caching external feeds
Just a few small patches. - You can easily composer-install the package to use in other projects. - Only makes one request for the RSS feed (originally made two requests,...
Fist delete remote files when the files expire, function cache_feed. private function cache_feed() { if($this->remote_file_exists($this->remote)) { //---------------------line-added-begin //First delete localfiles unlink($this->local); //---------------------line-added-end //Second get and create the remote files, this...
To reduce hits to the disk can you add a function that instead caches the data to Zend Opcache ?
The ROOT constant is unique to CakePHP as far as I am aware. In any case this will allow you to set the local cache file to a path of...
If we are using this piece of code to cache more than one feed, it would be better to pass only URL of remote file. Works fine for single feed...
PHP Warning: file_put_contents(../cache/feed.xml) [function.file-put-contents]: failed to open stream: No such file or directory in /Users/Nathan/httpdocs/******/lib/FeedCache.php on line 61 This is what I'm getting after replacing 'ROOT' with the actual path...