Clears (removes) all cached log messages.

def clear(self):
        """
        Clears (removes) all cached log messages.
        """
        self._lock.acquire()
        try:
            self._cache = []
            self._updated = False
        finally:
            self._lock.release()