Skip to content

Releases: angelnikolov/ts-cacheable

1.2.7

20 Oct 09:27
73c8a59
Compare
Choose a tag to compare

There was an unneeded shareReplay operator added to the observable returned by the @Cacheable decorated method which caused other calls to the method to reuse the return value of the previous call, even if it was already unsubscribed for.
This was clearly visible when you had multiple routes using async pipes subscribed to cached service methods. Basically, navigating fast through routes, would cause the async pipe to not unsubscribe from the Observable on ngDestroy which caused performance issues. Also, sometimes you could witness stale data due to the same issue.
Thanks @DrakeAnglin for reporting!

1.2.5

21 Jun 15:12
6c60e40
Compare
Choose a tag to compare

Before, the PCacheable always returned asynchronously due to a Promise 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.

1.2.4

14 Jun 16:20
eb68567
Compare
Choose a tag to compare

Added the ability to provide the promise decorator with a custom Promise implementation.
Useful for people who use AngularJS and want to use $q instead of native Promises.

1.2.3

05 Jun 09:23
Compare
Choose a tag to compare

Fixed a small issue in PCacheable which caused errors to be swallowed and propagated to caller

1.2.2

22 Apr 23:08
Compare
Choose a tag to compare

Added IAsyncStorageStrategy to the PCacheable decorator.
Now you can implement your own asynchronous caching strategy for the Promise decorator only.
Possible use cases for this might include Redis, database caching and etc..

1.1.8

14 Apr 17:27
c2d261e
Compare
Choose a tag to compare
  • Added support for custom storage strategies
    • Build your own by simply extending the IStorageStrategy abstract class and provide it to your decorators globally or ad-hoc
  • Switched on noImplicitAny and modified the codebase with more concrete typings
  • Refactored test suite and added more tests.

1.1.6

29 Mar 21:27
fabdd2a
Compare
Choose a tag to compare

Promise cacheable decorators now have a dedicated global cache buster Subject called promiseGlobalCacheBusterNotifier.

1.1.5

29 Mar 21:18
fabdd2a
Compare
Choose a tag to compare

Fixed an concerning methods with default parameters - #30

1.1.4

23 Mar 23:19
Compare
Choose a tag to compare

An issue preventing Angular CLI from building and serving in AoT was fixed.

1.1.3

19 Mar 22:27
Compare
Choose a tag to compare

Fixes:
Created a dedicated IObservableConfig for the Cacheable decorator which includes the async option for decorating Observable methods.
The PCacheable decorator does not support that option so it didn't make sense it having it in its config so now it will use the base IConfig instead.