mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-24 00:53:10 +02:00
fix: remove unnecessary calls to purgeCache (#3502)
This commit is contained in:
@@ -48,7 +48,7 @@ class EZTVBridge extends BridgeAbstract
|
||||
public function collectData()
|
||||
{
|
||||
$eztv_uri = $this->getEztvUri();
|
||||
Debug::log($eztv_uri);
|
||||
Logger::debug($eztv_uri);
|
||||
$ids = explode(',', trim($this->getInput('ids')));
|
||||
foreach ($ids as $id) {
|
||||
$data = json_decode(getContents(sprintf('%s/api/get-torrents?imdb_id=%s', $eztv_uri, $id)));
|
||||
|
@@ -223,10 +223,10 @@ EOD;
|
||||
CURLOPT_POSTFIELDS => json_encode($request)
|
||||
];
|
||||
|
||||
Debug::log("Sending GraphQL query:\n" . $query);
|
||||
Debug::log("Sending GraphQL variables:\n" . json_encode($variables, JSON_PRETTY_PRINT));
|
||||
Logger::debug("Sending GraphQL query:\n" . $query);
|
||||
Logger::debug("Sending GraphQL variables:\n" . json_encode($variables, JSON_PRETTY_PRINT));
|
||||
$response = json_decode(getContents('https://gql.twitch.tv/gql', $header, $opts));
|
||||
Debug::log("Got GraphQL response:\n" . json_encode($response, JSON_PRETTY_PRINT));
|
||||
Logger::debug("Got GraphQL response:\n" . json_encode($response, JSON_PRETTY_PRINT));
|
||||
|
||||
if (isset($response->errors)) {
|
||||
$messages = array_column($response->errors, 'message');
|
||||
|
@@ -228,6 +228,7 @@ EOD
|
||||
|
||||
$cache->setScope('twitter');
|
||||
$cache->setKey(['cache']);
|
||||
// todo: inspect mtime instead of purging with 3h
|
||||
$cache->purgeCache(60 * 60 * 3);
|
||||
$api = new TwitterClient($cache);
|
||||
|
||||
|
Reference in New Issue
Block a user