If thread invalidates its cache after acquiring lock and flush its cache before release lock why is it necessary to make variable volatile in singleto
If thread invalidates its cache after acquiring lock and flush its cache before release lock why is it necessary to make variable volatile in singleton pattern, since thread which aquires the lock later on should ideally invalidates its cache after acquiring lock and get the new value from the memory.