Script cache

Added Caching to scripts.