
Upstream components may incorrectly clear the interrupted flag and not propagate an exception when the caching thread is interrupted due to cancellation. Pass a settable flag down to CacheUtil.cache and check it frequently so it's not necessary to rely on the interrupted flag. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=195371244