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

Fix ios privacy mode #133

Closed ebarbeito closed 10 years ago

ebarbeito commented 10 years ago

PR related to #128

Remove operations throw a QuotaExceededError within iOS7 browser running in privacy mode.

[Error] Error: QuotaExceededError: DOM Exception 22
setItem@[native code]
A@http://192.168.1.11:9000/bower_components/angular-cache/dist/angular-cache.min.js:10:10493
removeAll@http://192.168.1.11:9000/bower_components/angular-cache/dist/angular-cache.min.js:10:13381
...

This fix avoids the execution of AngularCache.remove or AngularCache.removeAll when disabled is true.

Current 2.x version was also fixed to 2.4.0

coveralls commented 10 years ago

Coverage Status

Coverage decreased (-0.12%) when pulling f7bb4c449102d0cd65224221796d4a4ffce330a3 on ebarbeito:fix-ios-privacy-mode into 916a5ec315820345e16a5d43b19a2e51a9f368ca on jmdobry:v2.