How to use try cache in for each row