public function end($name, $append = true)
    {
        $content = trim(ob_get_contents());
        ob_end_clean();

        $hash = md5($content);

        if (isset($this->hashCache[$hash])) {
            return;
        }

        $this->hashCache[$hash] = true;

        if (isset($this->blocks[$name]) && $append) {
            $this->blocks[$name] .= $content;
        } else {
            $this->blocks[$name] = $content;
        }
    }