Ivy local cache path extraction

Cherry-picked from 0.13 branch