made script caching optional