Cache .cursor and transforms in one function