From e80b63b5c1d2703554c9fd44e2f9171a81cb3b9b Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 19 Oct 2020 12:33:38 -0700 Subject: [PATCH] Fixed #8526 - skip cache for setup check --- app/Models/Setting.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/Models/Setting.php b/app/Models/Setting.php index 0d819ac818..ece4a449c4 100755 --- a/app/Models/Setting.php +++ b/app/Models/Setting.php @@ -117,18 +117,20 @@ class Setting extends Model */ public static function setupCompleted(): bool { - return Cache::rememberForever(self::SETUP_CHECK_KEY, function () { try { $usercount = User::withTrashed()->count(); $settingsCount = self::count(); - + \Log::debug('User table and settings table exist and have records.'); + \Log::debug('Settings: '.$settingsCount ); + \Log::debug('Users: '.$usercount ); return $usercount > 0 && $settingsCount > 0; } catch (\Throwable $th) { - // Catche the error if the tables dont exit - } + \Log::debug('User table and settings table DO NOT exist or DO NOT have records'); + // Catch the error if the tables dont exit + return false; + } + - return false; - }); } /**