Each time mw.loadData is called, it calls dataWrapper at the end. Maybe it would make more sense to put the wrapped data in the cache?
Also, maybe this could make table lookup significantly faster, because the seen variable in dataWrapper would be have to be fed only once.
if not data then ... data = dataWrapper(data) loadedData[module] = data end return data