title: How can i clear cache in android when logout?
body: <p>I am having a problem with my application, when the user login, it will display his data in the Listview, and also i am saving his data to the cache so that i can minimize the request of the user unless he will swipe refresh the Listview then there will be another request and it will clear the cache.</p>
  
  <p>but the problem that i am having is when the user logout, and another user login to the app with the same phone that they are using, the new user that will login will see the data that the previous user have, it is because of the cache, so the new user needs to swipe refresh it to clear the cache and he will be able to see his data now.</p>
  
  <p>here is my code in logout.</p>
  
  <pre><code>    public void logoutProfileUser(){
              session.setLogin(false);
  
              db_login.deleteUsers();
              db_profile.deleteUserProfile();
  
              // Launching the login activity
              Intent intent = new Intent(getContext(), LoginActivity.class);
              intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK |Intent.FLAG_ACTIVITY_CLEAR_TOP);
              startActivity(intent);
      }
  </code></pre>
  
  <p>and i am using Volley in saving cache, is it possible to clear the cache when the user click the logout button? any help will be really appreciated.</p>