cache and link contracts