Commit 7b6f41be authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Merge branch '508-weitersuchen-funktioniert-nur-noch-fur-witch' into 'development'

Resolve "Weitersuchen funktioniert nur noch für Witch"

Closes #508

See merge request !887
parents 64b749a4 bd489444
......@@ -151,6 +151,8 @@ class Searcher implements ShouldQueue
private function storeResult($result, $poptime, $hashValue){
Redis::hset('search.' . $hashValue, $this->name, $result);
// After 60 seconds the results should be read by the MetaGer Process and stored in the Cache instead
Redis::expire('search.' . $hashValue, 60);
$this->lastTime = microtime(true);
}
......
......@@ -236,6 +236,7 @@ abstract class Searchengine
$body = Cache::get($this->hash);
} elseif (Redis::hexists('search.' . $this->resultHash, $this->name)) {
$body = Redis::hget('search.' . $this->resultHash, $this->name);
Redis::hdel('search.' . $this->resultHash, $this->name);
if ($this->canCache && $this->cacheDuration > 0) {
Cache::put($this->hash, $body, $this->cacheDuration);
}
......@@ -244,7 +245,6 @@ abstract class Searchengine
$this->loadResults($body);
$this->getNext($metager, $body);
$this->loaded = true;
Redis::hdel('search.' . $this->hash, $this->name);
return true;
} else {
return false;
......
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