How does one initialize data into a module only once?

In your particular situation, we only encounter the “We are actual loading the module for runtime, not caching code to disk. TestData keys: Any[1]” case once. That’s when you should load your large data set. In the else block I recommend loading an abbreviated data set since this is only for caching some compiled code to disk.

In the larger scheme of things, the push!(LOAD_PATH, pwd()) method of loading a module is not recommended. The better way to do this would probably be to use Pkg.develop for your all encompassing project and perhaps make these all submodules of that project. In this case, the files would live within the src subdirectory. At the root, you would have a Project.toml and Manifest.toml. Let me know if you need more details on how this should work.