angelnikolov / ts-cacheable

Observable/Promise Cache Decorator
https://npmjs.com/package/ts-cacheable
ISC License
340 stars 42 forks source link

Added AsyncStorageStrategy tests and updated the Promise decorator #43

Closed angelnikolov closed 5 years ago

angelnikolov commented 5 years ago

Before, the Promise decorator always returned asynchronously due to a Promsie wrapping I added a while ago so we support async storage strategies (Redis, IndexedDB and etc.). I realized that this wasn't necessary and the methods should return synchronously if they were sync in the first place.