unsetting registry before cache