mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-27 11:56:23 +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)
|
public static function hasTable($tableName)
|
||||||
{
|
{
|
||||||
$cache = self::getCache();
|
$cache = self::getCache();
|
||||||
$cacheKey = 'tableList';
|
$configData = serialize(DB::getConfig());
|
||||||
|
$cacheKey = 'tableList_' . md5($configData);
|
||||||
$tableList = $cache->get($cacheKey) ?? [];
|
$tableList = $cache->get($cacheKey) ?? [];
|
||||||
if (empty($tableList) && DB::is_active()) {
|
if (empty($tableList) && DB::is_active()) {
|
||||||
$tableList = DB::get_schema()->tableList();
|
$tableList = DB::get_schema()->tableList();
|
||||||
|
Loading…
Reference in New Issue
Block a user