public function remove($key)
    {
        if (! $this->enabled) {
            return;
        }
        $file = $this->getPath($key);
        if (! file_exists($file)) {
            return true;
        }

        set_error_handler(function () {
            throw new Exception('An error occurred.');
        }, E_WARNING);

        try {
            unlink($file);
        } catch (Exception $ex) {
            restore_error_handler();

            return false;
        }
        restore_error_handler();

        return true;
    }