seanchenxi/gwt-storage — pull request #3 by rdwallis (2014-07-22 16:13:01+00:00)
Title: Automatically recover from most quota exceptions

This patch allows you to add a priority to a value when you store it.

If there is a quota exception then items will automatically be deleted from storage in the order of their priority.

Higher priorities are smaller eg. an item with priority 5 will be deleted before an item with priority 4.

Items with negative priorities or without a priority will never be deleted and a StorageQuotaException will be fired as before.

I've also added put silently methods that don't throw a storage quota exception at all.

This patch is backwards compatible so if you don't use the priority stuff your code will continue to work as before.