Visual Studio .NET - Problem in File Dependency caching

Asked By Madhavan M on 17-May-06 10:32 AM
Hi,
       We are trying to develop a sample web applications based on the Web caching with data dependency and File dependency. We have followed the below mentioned steps to execute the program. We use .net 2003 to develop our sample application
We have a web form and a server button control in it.
                In the button click event we are populating the datagrid with the value obtained from a File (File Dependency). We have also included a CacheItemRemovedCallback event to get triggered when there is a change in the File. If we try to change the file with new set of data, the event is getting triggered and the value is getting populated into the dataset and we are binding the value to the datagrid.
                We are not able to bind the updated [Modified] data to the datagrid. The application is binding the old data what we had at the load time. Moreover the PRERENDER Event of the web page is not getting triggered when the CacheItemRemovedCallback event is executed. we tried to include _doPostBack event to get a postback so that we can execute the PRERENDER page event, but is is in vain.
              Please help us in this regard. We have developed the code based on the article available in this site (http://www.eggheadcafe.com/articles/20030716.asp).
When we add an item in the cache, we are having AbsoluteTime and Sliding time as 
Cache.NoAbsoluteExpiration and Cache.NoSlidingExpiration. Is this causing the problem

How are you able to add an item to Cache

Asked By Peter Bromberg on 17-May-06 11:32 AM
with NoAbsoluteExpiration AND NoSlidingExpiration? You should get an exception. 
If you do not get an exception then basically you have no expiration of any kind at all, which means, obviously, that it doesn't matter whether your file changes or not, the Cache item will never be invalidated.
Does this all make sense, or are we missing something here?