The cloud-based messaging feature is one of the biggest advantages of Telegram in my view. It gives an upper hand to Telegram over Whatsapp. So what happens, in other messaging apps all your media files and data stored locally on your phone whether it is an image, video, music or something else which ultimately eat up all your local storage space. However, with Telegram, this is not a problem, all media files including chat store on the Telegram secure cloud servers and remain there until and unless you want to download some of the files manually to save on your local storage. Yes, the cache will be created by the app on local storage. See: How to install the Telegram app on Ubuntu 19.04/Linux Mint?