Simplify tofu detection cache

Change-Id: If68fce9c0bd281019de6e2992c856bdbe843aec8
Merge "Simplify tofu detection cache"