Add test for rejecting promise.
Code cleanup.
Handle pending requests on errors.
Remove unnecessary require.
Make the cache always call the callbacks asynchronously for consistency.
Add warning in README about bad usage.