1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-06 08:37:30 +02:00

Added the Cache cleaning system.

This commit is contained in:
Teromene
2015-12-04 09:19:05 +00:00
parent a07839019e
commit f386fc4a10
2 changed files with 24 additions and 5 deletions

View File

@@ -1,7 +1,6 @@
<?php
/*
TODO :
- manage SSL detection because if library isn't loaded, some bridge crash !
- factorize the annotation system
- factorize to adapter : Format, Bridge, Cache (actually code is almost the same)
- implement annotation cache for entrance page
@@ -17,6 +16,8 @@ date_default_timezone_set('UTC');
error_reporting(0);
//ini_set('display_errors','1'); error_reporting(E_ALL); // For debugging only.
require_once __DIR__ . '/lib/RssBridge.php';
// extensions check
if (!extension_loaded('openssl'))
die('"openssl" extension not loaded. Please check "php.ini"');
@@ -24,8 +25,6 @@ if (!extension_loaded('openssl'))
// FIXME : beta test UA spoofing, please report any blacklisting by PHP-fopen-unfriendly websites
ini_set('user_agent', 'Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20121202 Firefox/30.0 (rss-bridge/0.1; +https://github.com/sebsauvage/rss-bridge)');
// -------
// default whitelist
$whitelist_file = './whitelist.txt';
$whitelist_default = array(
@@ -59,9 +58,9 @@ else {
array_pop($whitelist_selection);
}
Cache::purge();
try{
require_once __DIR__ . '/lib/RssBridge.php';
Bridge::setDir(__DIR__ . '/bridges/');
Format::setDir(__DIR__ . '/formats/');