mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
take db config into account for cache key
This commit is contained in:
parent
89195568a3
commit
5680733eb6
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user