- Fix getAllDataForKey crash.
- Fix babel config for web compatiblity.
- Refactor code.
- Complete tests.
- Provide types.
- Provide prebuilt lib for web.
- check key availability in clearMapForKey
rawData
is now deprecated, use "data" instead!- Upgrade jest to 19.0.0
- Now you can pass extra params to sync method.
- Fix clearMap
- Now you can check error type (NotFoundError and ExpiredError) in catch
- Optimize cache strategy
- Now you need to specify storageBackend(AsyncStorage or window.localStorage), otherwise the data would not be persisted.
- Now when load() failed to find data, it will throw an Error with message instead of undefined.
defaultExpires
can benull
now, which means never expire.
- add getIdsForKey, getAllDataForKey, clearMapForKey methods
- fix some expires logic
- refactor unit tests
- getBatchDataWithIds now won't invoke sync if everything is ready in storage.
- Fix bugs in promise chain.
- Can be used without any storage backend.(Use in-memory map)
- All methods except remove and clearMap are now totally promisified. Even custom sync methods can be promise. So you can chain them now.
- Adjust map structure.
- Improved some test cases.