Added caching to test script.