It could work something like the following
- for each mod, checksum all of the .lua files (to account for requiring files)
- if the checksums match the cached data.raw, load that from disk and use it to build the in-game prototypes
- else, proceed as normal, and cache the data.raw table along with the checksums calculated earlier.
- for each step in the normal load process:
- checksum the file before it is executed, and add it to a list of file,checksum pairs
- check for a cached data.raw that matches the file,checksum pairs
- if one exists, make note of it and continue
- if one does not exist
- load the latest data.raw from cache (or start from scratch like normal if there is nothing cached)
- run the file
- cache the current state of data.raw
- load the latest data.raw from cache if data.raw has not yet been populated (ie. we have everything cached)
It would probably only be of interest to heavily modded games, as the base data seems to load fast enough, and it would result in a significant amount of disk space being used.