【问题标题】:F5 Big-IP caching through iRule通过 iRule 进行 F5 Big-IP 缓存
【发布时间】:2020-01-08 19:14:46
【问题描述】:

有一个 iRule 强制 uri 进入缓存。

when HTTP_REQUEST {
 if { [HTTP::header "Content-Type"] contains "jpg" } {
    CACHE::enable 

 }
}

似乎该项目将被永久缓存或直到缓存被强制清空。有没有办法可以为这些项目添加有效期?

【问题讨论】:

    标签: http caching f5 big-ip irule


    【解决方案1】:

    根据https://clouddocs.f5.com/api/irules/UsingIRulesToManipulateCache.html 的信息,我猜你可以这样做:

    when CACHE_REQUEST {
      if { [HTTP::header "Content-Type"] contains "jpg" && [CACHE::age] > 60 } {
        CACHE::expire
      }
    }
    

    【讨论】:

      猜你喜欢
      • 2019-12-17
      • 1970-01-01
      • 1970-01-01
      • 2021-11-05
      • 1970-01-01
      • 2013-07-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多