<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def flush(self):
 """ Flush all unwritten data to disk. """

        if self._cache_modified_count > 0:
            self.storage.write(self.cache)
            self._cache_modified_count = 0