jmdobry/angular-cache — pull request #139 by bennekrouf (2014-11-04 16:29:10+00:00)
Title: fix(Local Storage) Catch and manage exception when local storage size is reached

"capacity" does not prevent from having a maximum size reached exception with the local storage.

Here, the idea is to catch this exception (around setItem), compute the size of the item that is provoking the exception. Then, removing from the cache oldest item until there are enough space for adding this new item.