zoukankan      html  css  js  c++  java
  • 页面缓存 OutputCache


    <%@ OutputCache Duration="15" VaryByParam="none" %> 使用页面输出缓存
    <%@ OutputCache Duration="3600" VaryByParam="id" %> 使用参数变化输出缓存
    <%@ OutputCache Duration="3600" VaryByControl="DropDownList1" %> 基于控件变化的输出缓存
    <%@ OutputCache Duration="3600" VaryByHeader="User-Agent" %>基于头变化的输出缓存
    <%@ OutputCache Duration="3600" VaryByParam="none" VaryByCustom="browser" %>基于浏览器变化的输出缓存
    <%@ OutputCache Duration="3600" VaryByParam="none" Location="Any"%>设置缓存的位置
    <%@ OutputCache Duration="3600" VaryByParam="none" %> 创建页面输出缓存的文件依赖 当文件修改时 缓存页面自动失效 并重新在下次页面请求是生成 

         Response.AddFileDependency(MapPath("Movies.xml"));

    <%@ OutputCache Duration="3600" VaryByParam="none" %>使用编程的方式设置页面输出缓存过期 

        HttpResponse.RemoveOutputCacheItem(Page.ResolveUrl("~/xxxx.aspx"));

         Response.Redirect("~/xxxx.aspx");

    <%@ OutputCache Duration="3600"  CacheProfile="CachelHours"  %>创建页面输出缓存配置

    <system.web>
       <caching>
          <outputCacheSettings>
             <outputCacheProfiles>
                <add name="CacheHour" duration="3600" varyByParam="none"/>
             </outputCacheProfiles>
          </outputCacheSettings>
       </caching>
     </system.web>

  • 相关阅读:
    pytest-html的更多功能
    pytest使用allure测试报告
    airtest+pytest实战教程02-APP页面元素获取
    airtest+pytest实战教程01-环境配置
    python发送邮件
    python获取文件名
    python生成GIF
    Selenium+Unittest自动化测试框架实战
    xpath定位和css定位
    Lucas(卢卡斯)定理模板&&例题解析([SHOI2015]超能粒子炮&#183;改)
  • 原文地址:https://www.cnblogs.com/Yellowshorts/p/2915893.html
Copyright © 2011-2022 走看看