public function process()
    {
        if ($this->cacheOutput && $this->cache) {
            $contents = $this->input->process();
            $key = md5($contents);

            if (!($output = $this->cache->get($key))) {
                $output = $this->output->process($contents, $this->generator);
                $this->cache->set($key, $output);
            }
        } else {
            $output = $this->output->process(
                $this->input->process(),
                $this->generator
            );
        }

        return $output;
    }