title: How to keep a json in memory or cache with angularjs?
body: <p>I have a angularjs app which reads json from java when the user is logged in:</p>
  
  <pre><code>$http({ method: 'POST', url: 'ws/login/user', data : user, cache: true })
  .success(function (response) {                                                    
      $rootScope.userInfo = response; // Here I get the json                                          
      response = { success : true };                    
      callback(response);
  }).error(function (response) {
      response = { success : false };
      response.message = 'Error.';
      callback(response);
  });
  </code></pre>
  
  <p>Everything works fine until I press F5, then the JSON disappears.</p>
  
  <p>How can I keep the data between page loads?</p>