Skip to content

Commit

Permalink
🔄 Push
Browse files Browse the repository at this point in the history
  • Loading branch information
Eval committed Sep 9, 2018
1 parent c1e9832 commit 23d89a8
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions src/kaleido/http/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,19 @@ public function handle() {
* @throws \ErrorException
*/
private function complete() {
switch ($this->loadCache) {
case !\count($this->loadCache):
$this->loadDatabase();
break;
case \count($this->loadCache) > 1:
$redis = $this->predis();
$this->checkLoadData();
$this->generateHash();
$this->unpackExpire($redis);
$this->isExist($redis);
$this->isExpired();
$this->checkValidCache();
$this->saveRedis($redis);
$redis->disconnect();
$this->setConsole();
break;
if (\count($this->loadCache) > 1) {
$redis = $this->predis();
$this->checkLoadData();
$this->generateHash();
$this->unpackExpire($redis);
$this->isExist($redis);
$this->isExpired();
$this->checkValidCache();
$this->saveRedis($redis);
$redis->disconnect();
$this->setConsole();
} elseif (!\count($this->loadCache)) {
$this->loadDatabase();
}
}

Expand Down

0 comments on commit 23d89a8

Please sign in to comment.