Enhance repo creation scripts idempotency by supporting caching