Ivy local cache path extraction 0.12

Cherry-picked from 0.13 branch