Added functionality to manage caching of measure JS generation