protected function _compress($code, $cacheId)
    {
        $code = (string) $code;

        // remove comments
        $code = preg_replace('#/\*[^*]*\*+([^/][^*]*\*+)*/#ius', '', $code);

        $code = str_replace(
            ["\r\n", "\r", "\n", "\t", '  ', '    ', ' {', '{ ', ' }', '; ', ';;', ';;;', ';;;;', ';}'],
            ['', '', '', '', '', '', '{', '{', '}', ';', ';', ';', ';', '}'],
            $code
        ); // remove tabs, spaces, newlines, etc.

        // remove spaces after and before colons
        $code = preg_replace('#([a-z\-])(:\s*|\s*:\s*|\s*:)#ius', '$1:', $code);

        // spaces before "!important"
        $code = preg_replace('#(\s*\!important)#ius', '!important', $code);
        $code = Str::trim($code);

        return implode('', [$cacheId, $code]);
    }