2014-10-19 3 views
0

난 내 페이지를 캐시와 캐시IIS 및 클라이언트에서 페이지를 캐시하는 방법은 무엇입니까?

[OutputCache(Duration = 21600, VaryByParam = "none")] 
    public ActionResult Index() 
    { 
      //some codes 
     return View(); 
    } 

의이 유형을 사용하고 싶지만 내가 캐시 이러한 유형의 IIS 또는 클라이언트 브라우저에 저장됩니다 혼동 해요?

서버에없는 사용자 브라우저에서 내 페이지를 캐시 할 수 있습니까?

답변

1

기본 asp.net 캐시 페이지 (서버, 프록시, 클라이언트)가 가능한 모든 곳. 귀하는 다음 값 중 하나에 위치 속성을 설정할 수 있습니다 속성

[Output(Location=OutputCacheLocation.Any)] 

하여이를 변경할 수 있습니다

  • OutputCacheLocation · 모든
  • OutputCacheLocation · 클라이언트
  • OutputCacheLocation.Downstream
  • OutputCacheLocation.Server
  • OutputCacheLocation.None
  • OutputCacheLocation.ServerAndClient
관련 문제