Clear cache when Logout ionic 2

i have a case, i have 2 different account for login, i have profile page,and i can change my name in my profile page, and success, but when i logout and try to login again with different account to see different data in profile page it wasn’t Change, it still display data from the previous account.

how to automatically clear cache when user logout ?

this is my logout at auth-data.ts

logoutUser()
  {
    return this.fireAuth.signOut();
  }

logout button function at home.ts

logoutUser(){
      this.authData.logoutUser().then(() => {
        this.navCtrl.setRoot(LoginPage);
      });
    }

it’s not work for me, cache still saved

1 Like