Adds caching for ITE function