Good evening joori__zhuli,
Welcome to the Apple Support Communities!
It sounds like you had an issue playing a video in the YouTube app on your iPad. Was this a video that you searched for in the app, or was a link to the video provided to you? Did you have any issues playing other videos while you had the YouTube app open on your iPad? Did you test to see if videos would play in Safari or in other web-based apps? The inability to play one or more video files does not indicate a bug or a virus on your device.
We assume you are asking how to close all open apps to "clear the cache" on your iPad. Quit the YouTube app and restart your iPad as the first troubleshooting step.
How to force an app to close on your iPhone, iPad, or iPod touch
If the issue persists for any video that you attempt to play in YouTube, you can try deleting and reinstalling the YouTube app:
Open the Settings app and tap General > iPad Storage
Find the YouTube app in the list (which is sorted by data used)
Tap Delete App
Try downloading the YouTube app again from the App Store. If the issue persists, follow the instructions below to reach out to YouTube directly:
If an app unexpectedly quits, stops responding, or won’t open
Take care.