protected function load($namespace, $require = false)
    {
        // If cache is set.
        if (isset($this->cache[$namespace])) {
            return $this->cache[$namespace];
        }

        $file = $this->getConfigFile($namespace);
        $configuration = null;

        try {
            $configFile = new YamlConfiguration($file);
            $configuration = $configFile->get();

            if (is_array($configuration) && !empty($configuration['inherits'])) {
                $allConfiguration = [];

                foreach ($configuration['inherits'] as $parentNamespace) {
                    $allConfiguration[] = $this->load($parentNamespace);
                }

                $allConfiguration[] = $configuration;
                $configuration = $this->merge($allConfiguration);
                unset($allConfiguration, $configuration['inherits']);
            }

            unset($configFile);
        } catch (FileNotFoundException $e) {
            if ($require) {
                throw new FileNotFoundException('Could not find settings file for ' . $namespace);
            }
        }

        return $this->cache[$namespace] = $configuration;
    }