Glide: How to clear all App cache (images) when App is logout?
<p>I user Glide library in my App. And I want to clear completely all images cache (disk and memory) done by Glide, during the logout process. </p>

<p>The logout process is done through a Job (I used this library <a href="https://github.com/yigit/android-priority-jobqueue" rel="nofollow">android-queue</a>).</p>

<p>I want to call these lines:</p>

<pre><code>Glide.get(MyApplication.getInstance()).clearMemory();
Glide.get(MyApplication.getInstance()).clearDiskCache();
</code></pre>

<p>I have some troubles about thread when these lines are executed (not main thread; if I use Handler then this another error appears YOu must call this method on a background thread, etc.)</p>

<p>Thanks for your help!</p>