title: How to clear the cache while clearing localstorage
body: <p>I have set a Authentication token in local storage on login and clears it on logout. After logout if the user tries to login again, old authentication token taken from the cache is taken instead of newly set value. How to clear the cache while clearing localstorage. I am using angular 2 in my application.</p>
  
  <p>Login: </p>
  
  <pre><code>localstorage.setItem("token", "value")
  </code></pre>
  
  <p>Logout: </p>
  
  <pre><code>localstorage.clear();
  </code></pre>