0
asp.net 웹 응용 프로그램의 global.asax 파일에서 HttpRuntime.Cache가 클라이언트 측 또는 서버 측에서 캐싱을 수행합니까?HttpRuntime.Cache가 클라이언트/서버 측 캐싱을 수행합니다.
HttpRuntime.Cache["Key"]
또한이 코드 조각에 슬라이딩 만료를 설정할 수있는 가능성이 있습니까? 사전에
감사합니다.
편집 : 많은 생각을 한 후에 이것이 가능한 해결책이라고 가정합니다.
모든 system.web.ui.page가이 클래스에서 상속하는 asp.net 웹 응용 프로그램 전체에 대해 basePage 클래스를 추가하십시오.
및 서버에서 다음 코드protected override void OnInit(EventArgs e)
{
OutputCacheParameters aa = new OutputCacheParameters();
aa.Location = OutputCacheLocation.Client;<-- I am not sure whether this will work and gets added to the pages correctly or not.Any Ideas on these two lines of code.
base.OnInit(e);
Cache.Add("State", "", null, DateTime.Now.AddMinutes(20), Cache.NoSlidingExpiration, CacheItemPriority.High, null);
Cache.Add("StatesGlobal", "", null, Cache.NoAbsoluteExpiration, new TimeSpan(1,0,0,0,0), CacheItemPriority.High, null);
}
당신은 내게의 기대 된 빵 반 조각을했다. 그러나 클라이언트 서버 측면에서이 위치를 설정하는 방법. 또는 기본 위치가 있습니다. 귀하의 URL에 따라 "onRemoveCallback"우리는 null 또는 뭔가 같은 퍼팅 같은 콜백 메서드를 정의하는 대신 다른 해결 방법을 가질 수 있습니까? 빠른 응답을위한 Thnks. – hungrycoder