Skip to content
Snippets Groups Projects
Commit 0714b6c6 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 fae76d18 986ca5dd
No related branches found
No related tags found
1 merge request!1365Resolve "Filter Options for MetaGer"
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment