Commit e9188a6d authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

removed caching from request fetcher

parent f77dab0b
......@@ -2,7 +2,6 @@
namespace App\Console\Commands;
use Cache;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Redis;
use Log;
......@@ -122,7 +121,6 @@ class RequestFetcher extends Command
Redis::pipeline(function ($pipe) use ($resulthash, $body, $cacheDurationMinutes) {
$pipe->set($resulthash, $body);
$pipe->expire($resulthash, 60);
Cache::put($resulthash, $body, $cacheDurationMinutes * 60);
});
\curl_multi_remove_handle($this->multicurl, $info["handle"]);
}
......
......@@ -3,6 +3,7 @@
namespace App\Models;
use App\MetaGer;
use Cache;
use Illuminate\Support\Facades\Redis;
abstract class Searchengine
......@@ -197,6 +198,7 @@ abstract class Searchengine
}
if ($body !== null) {
Cache::put($this->hash, $body, $this->cacheDuration * 60);
$this->loadResults($body);
$this->getNext($metager, $body);
$this->markNew();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment