Added a bit of server and client caching for measure JS generation