diff --git a/lib/HttpCachingBridgeAbstract.php b/lib/HttpCachingBridgeAbstract.php deleted file mode 100644 index 364606e9..00000000 --- a/lib/HttpCachingBridgeAbstract.php +++ /dev/null @@ -1,45 +0,0 @@ -debugMessage('Caching url ' . $url . ', duration ' . $duration); - - $filepath = __DIR__ . '/../cache/pages/' . sha1($url) . '.cache'; - $this->debugMessage('Cache file ' . $filepath); - - if(file_exists($filepath) && filectime($filepath) < time() - $duration){ - unlink ($filepath); - $this->debugMessage('Cached file deleted: ' . $filepath); - } - - if(file_exists($filepath)){ - $this->debugMessage('Loading cached file ' . $filepath); - touch($filepath); - $content = file_get_contents($filepath); - } else { - $this->debugMessage('Caching ' . $url . ' to ' . $filepath); - $dir = substr($filepath, 0, strrpos($filepath, '/')); - - if(!is_dir($dir)){ - $this->debugMessage('Creating directory ' . $dir); - mkdir($dir, 0777, true); - } - - $content = $this->getContents($url); - if($content !== false){ - file_put_contents($filepath, $content); - } - } - - return str_get_html($content); - } -} diff --git a/lib/RssBridge.php b/lib/RssBridge.php index 6dd26631..07286831 100644 --- a/lib/RssBridge.php +++ b/lib/RssBridge.php @@ -12,7 +12,6 @@ require __DIR__ . '/Format.php'; require __DIR__ . '/FormatAbstract.php'; require __DIR__ . '/Bridge.php'; require __DIR__ . '/BridgeAbstract.php'; -require __DIR__ . '/HttpCachingBridgeAbstract.php'; require __DIR__ . '/FeedExpander.php'; require __DIR__ . '/Cache.php'; require __DIR__ . '/CacheAbstract.php';