public function construct(array $pugTarget, Filesystem $files, array $config, $defaultCachePath = null)
    {
        $this->pugTarget = $pugTarget;
        $cachePath = null;

        foreach (array('cache_dir', 'cache', 'defaultCache') as $name) {
            if (isset($config[$name])) {
                $cachePath = $config[$name];

                break;
            }
        }

        if (!$cachePath) {
            $cachePath = $defaultCachePath ?: $this->getCachePath();
        }

        parent::__construct($files, $cachePath);
    }