Hi,
I am trying to read the excel file and keep it in cache and invalidate the cache when the file contents has changed.
With the help HostFileChangeMonitor but doesn't seem to fire.
What could be missing?
if (File.Exists(productfilepath))
{
const string cacheobj = "productlist";
list = _cahce.Get(cacheobj ) as List<Product>;
if (list == null)
{
list = GetProductsList();// calls another method to get information from excel
_policy.ChangeMonitors.Add(new HostFileChangeMonitor(new List<string> { productfilepath }));
_cahce.Add(cacheobj,list,_policy);
}
}
Go to the complete details ...