jmdobry / angular-cache

angular-cache is a very useful replacement for the Angular 1 $cacheFactory.
http://jmdobry.github.io/angular-cache
MIT License
1.39k stars 156 forks source link

verifyIntegrity for gets is not working #89

Closed GulinSS closed 10 years ago

GulinSS commented 10 years ago

Just see:

  1. Open in two tabs: http://jsfiddle.net/Q7rxz/3/
  2. Write to input a string in first tab
  3. Switch to second tab and press 'Refresh'. You should see your string. It is usual behaviour.

Next:

  1. Open in two tabs http://jsfiddle.net/4DRAZ/2/
  2. Write to input a string in first tab
  3. Switch to second tab and press 'Refresh'. You shouldn't see your string. It is strange!

Looks like angular-cache don't sync on get operations. I did a fork of the project. A bit later I will send you PR with fix. But I have some troubles with tests. See: https://github.com/jmdobry/angular-cache/blob/master/src/angular-cache.js#L1062 . I can't prepare unit tests by this reason but your project don't have any e2e-tests. So, how I should test it according to the project's environment?

GulinSS commented 10 years ago

My fork is: https://github.com/GulinSS/angular-cache