It may not be possible to answer the two questions you asked
I think we should first look at how many of these things there are. If there are many, they can be placed directly in the database. If there are not too many, there is no problem in recording them in files like you do.
Then the timing of loading is to load when in use and to preload when the process starts. The former is more suitable for scenarios where there is a lot of data and not all of them are commonly used, while the latter is for scenarios where the number of transaction receipts is small but frequently used.
Then the storage location, if there is not too much data and it is used very frequently, can be directly made into a singleton and placed in the memory, one for each process; in the opposite case, you can consider getting it directly from the database, or using memcached/redis To do distributed caching.
It may not be possible to answer the two questions you asked