When code changes are published to .NET websites the re-compilation process involves restarting the AppDomain, this in turn wipes the application cache.
Are there any events raised when this happens? Is there any way to manually serialise portions of my cached data and save it to disk, then subsequently re-initialise the cache when the application is loaded again?
you can use MS AppFabric caching, it’s a free component for Windows Server and solves this by decoupling the caching from the ISS app domain.
see question and answers here: AppFabric vs System.Runtime.Caching
if you keep using ASP.NET Caching you are exposed at the issues you have described above and to my knowledge there is no solution.