How to delete cache of Microsoft Teams on macOS?
There are multiple locations with Teams cache files:

as noted by @JMY1000, the regular cache folder ~/Library/Caches
see @grg's answer here or this answer by a Microsoft employee: ~/Library/Application Support/Microsoft/Teams

If you remove just those, you don't need to login again, so the following Terminal commands would work:
rm -rf ~/Library/Caches/com.microsoft.teams
rm -rf ~/Library/Application\ Support/Microsoft/Teams/Application\ Cache/Cache
rm -rf ~/Library/Application\ Support/Microsoft/Teams/blob_storage
rm -rf ~/Library/Application\ Support/Microsoft/Teams/Cache
rm -rf ~/Library/Application\ Support/Microsoft/Teams/databases
rm -rf ~/Library/Application\ Support/Microsoft/Teams/GPUCache
rm -rf ~/Library/Application\ Support/Microsoft/Teams/IndexedDB
rm -rf ~/Library/Application\ Support/Microsoft/Teams/Local\ Storage
rm -rf ~/Library/Application\ Support/Microsoft/Teams/tmp


For those who prefer a solution outside Terminal:

open Finder
open the 'Go' menu, choose 'Go to Folder...'

(or alternatively, use the keyboard shortcut Shift+Cmd+G)


enter ~/Library/Caches and press Enter
delete the com.microsoft.teams folder



Similarly, go to the ~/Library/Application Support/Microsoft/Teams folder and delete these folders:

Application Cache/Cache
blob_storage
Cache
databases
GPUCache
IndexedDB
Local Storage
tmp