Adding ability to cache promises.

This adds an out-of-the-box way to cache previously executed promises. 
We have  removed a lot of code related with caching previous asynchronous calls in one of our projects with this approach.