Calling Database::general_messages()
clears the condition cache, but there's no intrinsic reason for it to do so - it just so happens that LOOT only reads the loaded general messages after some external state change that should cause that cache to be invalidated.
It would be more flexible for Database::general_messages()
to not clear the cache and instead provide another Database
method that only invalidates the condition cache. There's already a private Database::clear_condition_cache()
method that does that, it just needs to be made public and then exposed through the C++ wrapper.