in Windows you separate each drive by a letter like C:, D:, etc, however on Linux your drives are mounted as part of your folder structure. the top level is called root which would be /
you can then mount each disc as a folder under root, so for example /home
could be a separate hard drive but it’s still mounted under root, note the starting slash. This means the command deletes any and all files+directories under root, this can include mounted USB, mounted network drives and anything mounted to your root. you’re basically nuking all the files you can access when you’re logged in as admin/root.
caches are never really a concern to me they will regen after the fact, from your description i would worry more about db, this is dependent though in what you’re using and what you are storing. if the concern is having the same system intact then my primary concern would be backing up any config file you have. in cases of failure you mainly want to protect against data loss, if it takes time to regenerate cache/db that’s time well spent for simplicity of actively maintaining your system