docs: def _sync_writes(self):
          '''
          Flushes the write queue
          '''
          for key in self._wqueue:
              val = self._cache[key]
              self._database[key] = val
          del self._wqueue
          self._wqueue = set()
          self._database.sync()