[root tip] [How To] Disable write cache for USB storage devices

Where did you find information about the ID_USB_TYPE==‘disk’?
Searching on the web, or on man pages with man --global-apropos ID_USB_TYPE does not return a result on it.

Also, what about USB connected HDD docks? Does this apply to them too?

It is part of environment variables set by udev when a device is registered.

Please see the Arch Wiki on udev - especially see the links in the See Also section.

You can use udevadm to retrieve the information.

You can check - plug your device - then note the device path

udevadm test /dev/<device>