I am working on improving the performance of a server object extension by caching some data in memory that does not change once a map service is added to the server. I would like to change my cache to write the data to a file so I can free up some memory and avoid the computational overhead from recreating the cache every time an instance of the service is created. I know how to structure the cache, but I have one problem. I need to figure out if a service is deleted from the server so I can clear out the file cache. Often times services are deleted and then an updated version is added, at which point I need to update the cache. If I can trigger an event that deletes the cache associated with a service when that service is deleted, I think I can really improve the performance of the extension.
Thanks in advance,
Adam Lake
Echo Lake Consulting