1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-18 22:31:42 +02:00

[bridges] Use caching with applicable bridges

This commit is contained in:
logmanoriginal
2016-08-28 20:07:56 +02:00
parent e4b314f78a
commit 78f6757622
5 changed files with 25 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
<?php
class LichessBridge extends BridgeAbstract
class LichessBridge extends HttpCachingBridgeAbstract
{
public function loadMetadatas()
{
@@ -36,7 +36,10 @@ class LichessBridge extends BridgeAbstract
private function retrieve_lichess_post($blog_post_uri)
{
$blog_post_html = $this->getSimpleHTMLDOM($blog_post_uri);
if($this->get_cached_time($blog_post_uri) <= strtotime('-24 hours'))
$this->remove_from_cache($blog_post_uriuri);
$blog_post_html = $this->get_cached($blog_post_uri);
$blog_post_div = $blog_post_html->find('#lichess_blog', 0);
$post_chapo = $blog_post_div->find('.shortlede', 0)->innertext;