From 5680733eb6bb03ea032756515144f20f5c8b5282 Mon Sep 17 00:00:00 2001 From: Thomas Portelange Date: Thu, 21 Mar 2024 16:14:06 +0100 Subject: [PATCH] take db config into account for cache key --- src/Core/ClassInfo.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Core/ClassInfo.php b/src/Core/ClassInfo.php index 1c59ddfc6..57bfae4de 100644 --- a/src/Core/ClassInfo.php +++ b/src/Core/ClassInfo.php @@ -82,7 +82,8 @@ class ClassInfo public static function hasTable($tableName) { $cache = self::getCache(); - $cacheKey = 'tableList'; + $configData = serialize(DB::getConfig()); + $cacheKey = 'tableList_' . md5($configData); $tableList = $cache->get($cacheKey) ?? []; if (empty($tableList) && DB::is_active()) { $tableList = DB::get_schema()->tableList();