Added locks for conurrent access on no-cache flags