From fcb4afc1e30e3cde6d4bcdae2a162cdb6d5e1fca Mon Sep 17 00:00:00 2001 From: Dominik Hebeler <dominik@suma-ev.de> Date: Mon, 21 Dec 2020 19:55:56 +0100 Subject: [PATCH] expiring more redis keys --- app/MetaGer.php | 1 + app/Models/Quicktips/Quicktips.php | 1 + app/Models/Searchengine.php | 1 + 3 files changed, 3 insertions(+) diff --git a/app/MetaGer.php b/app/MetaGer.php index 51a7546f6..b608e4e87 100644 --- a/app/MetaGer.php +++ b/app/MetaGer.php @@ -858,6 +858,7 @@ class MetaGer continue; } else { Redis::lpush($answer[0], $answer[1]); + Redis::expire($answer[0], 60); } foreach ($engines as $index => $engine) { if ($engine->hash === $answer[0]) { diff --git a/app/Models/Quicktips/Quicktips.php b/app/Models/Quicktips/Quicktips.php index daaac1506..a542a9a16 100644 --- a/app/Models/Quicktips/Quicktips.php +++ b/app/Models/Quicktips/Quicktips.php @@ -85,6 +85,7 @@ class Quicktips do { $body = Redis::rpoplpush($this->hash, $this->hash); + Redis::expire($this->hash, 60); if ($body === false || $body === null) { usleep(50 * 1000); } else { diff --git a/app/Models/Searchengine.php b/app/Models/Searchengine.php index 32c402177..41203ab72 100644 --- a/app/Models/Searchengine.php +++ b/app/Models/Searchengine.php @@ -200,6 +200,7 @@ abstract class Searchengine } if (!$this->cached && empty($body)) { $body = Redis::rpoplpush($this->hash, $this->hash); + Redis::expire($this->hash, 60); if ($body === false) { return $body; } -- GitLab