private static void CacheFailure(Type/*!*/ type, string/*!*/ methodName, bool isStatic, int extensionVersion) {
// store failure to the cache if the cache is not owned by another thread:
var cache = Interlocked.Exchange(ref _clrFailedMemberLookupCache, null);
if (cache != null) {
cache[Key.Create(type, methodName, isStatic)] = extensionVersion;
Interlocked.Exchange(ref _clrFailedMemberLookupCache, cache);
}
}