temporary caching fix

 Just in case, this PR can be used to enable cache for current master ASAP without merging #13. 

Implementation is not compatible with #13 :)