To prevent that, I am adding code to serialize empty cache if the file is not present. This way, the attribute will be always set.