Forum Discussion

roger10dc_46053's avatar
roger10dc_46053
Icon for Nimbostratus rankNimbostratus
Oct 08, 2010

iRule to exclude certain content type from ram cache

Hi,

 

 

I am looking for an iRule to exclude certain content type from being ram cached thus going beyond the uri exclusion list...

 

 

Any help would be appreciated.

 

 

 

Jon

 

  • George_Watkins_'s avatar
    George_Watkins_
    Historic F5 Account
    Hi Jon,

    You'll need to do something like this:

     
    class bypass_ram_cache_filetypes {
       {
          "mp3"
          "pdf"
          "wmv"
       }
    }
    
    rule bypass_ram_cache_by_filetype {
       when HTTP_REQUEST {
            if { [class match [HTTP::path] ends_with $::bypass_ram_cache_filetypes] } {
                    log local0. "RAM Cache bypassed for [HTTP::path]"
                    CACHE::disable
            }
    }
    }