Cache object with ObjectCache in .Net with expiry time
问题 I am stuck in a scenario. My code is like below : Update : its not about how to use data cache, i am already using it and its working , its about expanding it so the method don't make call between the time of expiry and getting new data from external source object = (string)this.GetDataFromCache(cache, cacheKey); if(String.IsNullOrEmpty(object)) { // get the data. It takes 100ms SetDataIntoCache(cache, cacheKey, object, DateTime.Now.AddMilliseconds(500)); } So user hit the cache and get data