src/Components/SupportsExtraDbConfigs.php
public static function setConfig($id, $config, $local_config = null)
    {
        ServiceCacheConfig::setConfig($id, $config, $local_config);

        $result = (array)parent::setConfig($id, $config, $local_config);

        if (isset($config['allow_upsert'])) {
            $result['allow_upsert'] = filter_var($config['allow_upsert'], FILTER_VALIDATE_BOOLEAN);
        }

        if (isset($config['max_records'])) {
            $result['max_records'] = filter_var($config['max_records'], FILTER_VALIDATE_INT);
        }
        if (array_get($result, 'max_records', 0) <= 0 || empty($config['max_records'])) {
            unset($result['max_records']);
        }

        return $result;
    }
public static function setConfig($id, $config, $local_config = null)
    {
        ServiceCacheConfig::setConfig($id, $config, $local_config);

        $result = (array)parent::setConfig($id, $config, $local_config);

        if (isset($config['allow_upsert'])) {
            $result['allow_upsert'] = filter_var($config['allow_upsert'], FILTER_VALIDATE_BOOLEAN);
        }

        if (isset($config['max_records'])) {
            $result['max_records'] = filter_var($config['max_records'], FILTER_VALIDATE_INT);
        }
        if (array_get($result, 'max_records', 0) <= 0 || empty($config['max_records'])) {
            unset($result['max_records']);
        }

        return $result;
    }
{@inheritdoc}