mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-05 10:34:55 +02:00
[bridges] Use caching with applicable bridges
This commit is contained in:
parent
e4b314f78a
commit
78f6757622
5 changed files with 25 additions and 10 deletions
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
class KununuBridge extends BridgeAbstract{
|
||||
class KununuBridge extends HttpCachingBridgeAbstract {
|
||||
public function loadMetadatas(){
|
||||
$this->maintainer = "logmanoriginal";
|
||||
$this->name = "Kununu Bridge"; /* This will be replaced later! */
|
||||
|
@ -248,7 +248,10 @@ class KununuBridge extends BridgeAbstract{
|
|||
*/
|
||||
private function extract_full_description($uri){
|
||||
// Load full article
|
||||
$html = $this->getSimpleHTMLDOM($uri);
|
||||
if($this->get_cached_time($uri) <= strtotime('-24 hours'))
|
||||
$this->remove_from_cache($uri);
|
||||
|
||||
$html = $this->get_cached($uri);
|
||||
if($html === false)
|
||||
$this->returnServerError('Could not load full description!');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue