added caching of generated javascript. NOTE: changes to .d.ts files do not trigger cache updates