create a registry using require cache