Temperature is as important as cavity size in controlling spontaneous emission