Run only once and result caching function wrapper for Node.js