add decorator for caching results of func calls