I have a solution with two assemblies.
The first assembly/project loads data from a database and caches it (“Data Assembly”).
The second assembly/project performs calculations on the cached data (“Calculation Assembly”).
My workflow is as follows:
- Run a calculation calling a function in the Calculation Assembly – which triggers a bunch of data loads/caching by the Data Assembly.
- When I run the calculation a second time, it’s very fast since all of the data has been cached.
- Then I make certain adjustments in the code of the Calculation Assembly, and build it again.
The issue: even though I didn’t touch the Data Assembly’s binary, if I run the same calculations again, all of my cached data in the Data Assembly has disappeared.
Not sure if this is LINQPad specific or generally a dotnet expected behavior: if assembly A references assembly B and it has been recompiled, everything has to be recreated in memory again.
Hope this is clear!