有哪位大虾可以帮忙解释一下这几句代码,会有什么样的效果啊?
<%@ OutputCache Duration="5" Location="Server" VaryByParam="*" %>
 protected void Page_Load(object sender, EventArgs e)
 {
     Response.Cache.SetExpires(DateTime.Now.AddSeconds(3));
     //打开可调用期
      Response.Cache.SetSlidingExpiration(true);
     Label1.Text = DateTime.Now.ToLongTimeString();
 }

解决方案 »

  1.   

    <%@ OutputCache Duration="5" Location="Server" VaryByParam="*" %> 
    页面使用Cache,Cache的有效期为5 seconds
    protected void Page_Load(object sender, EventArgs e) 

        Response.Cache.SetExpires(DateTime.Now.AddSeconds(3)); 
      告诉Cache Manager,页面的有效期为当前时间+3秒
          Response.Cache.SetSlidingExpiration(true); 
        Label1.Text = DateTime.Now.ToLongTimeString(); 
    }