Caching Observables/Promises

Caching Observables/Promises

Sometimes, we may just want to cache a method return value for sometime. Typescript decorators come really handy. We can create a custom decorator and drop it on a method and be done with it.