Switched order of actions when doing repo rescan....
Switched order of actions when doing repo rescan.
doing invalidation after repository scan is not optimal.
In case of big repository we first create an instance then invalidate
cache that we don't actually need. Reversing this order prevents that