I use HTTPRuntime.Cache in my WCF service. It works locally (I mean "localhost:1234", not in IIS). But it doesnt work at server IIS. Is there any settings to do in IIS? The code in my method is like:
var response = (Response<CommonListObjects>) HttpRuntime.Cache.Get("commonObjects");
if (response!=null)
{
return response;
}
var service = ObjectFactory.GetInstance<ICommonListObjectsService>();
var listObjects=service.Get();
HttpRuntime.Cache.Add("commonObjects", listObjects, null, DateTime.Now.AddHours(2).Cache.NoSlidingExpiration, CacheItemPriority.Normal, null);
return listObjects;