result caching, first iteration

@DavidBadura , please take a look on a cache layer (do not merge yet)