I have a c# app, which caches few data table in memory from sql server database. I have written a thread to update the cache after 30 minutes, but that does not sounds a good solution. I feel the best solution will be to expire cache on data table data change. Is there any framework that does this by configuration. I check Enterprise Cache Liberary but it does not seems to provide eye on data table. Do I have to write trigger in database that will update a table that will help my thread to look into it and decide to expire the cache.
Please let me know the best practice for this requirement.