What is Cache Callback in Cache?

 Posted by Tripati_tutu on 10/5/2010 | Category: ASP.NET Interview questions | Views: 4745 | Points: 40

The cache object has dependencies e.g. it stores relationships to the file. Cache items remove the object when these dependencies change. For this we would need to simply execute a callback method whenever items are removed from the cache to add the items back in cache.

E.g.: We have a string variable string var="hello" and store it in cache. This item would be removed from the cache if value is changed from "hello" to "bye". In such a case we need to simply write a callback function which would add updated var back in cache as it’s been removed as a result of its dependencies changing.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response

More Interview Questions by Tripati_tutu