Forum Discussion
Darren_Person_2
May 11, 2007Nimbostratus
Hi All,
Just wanted to thank you for all your help! It turned out that we were on an older version and did the upgrade - here is the final code which we are now running:
when HTTP_REQUEST {
set filePath [string tolower [HTTP::path]]
if { ($filePath ends_with ".jpg") or ($filePath ends_with ".swf")}{
CACHE::uri [HTTP::host][HTTP::path]
}
}
There should probably be a bunch of files in this list (*.jpg, *.gif, *.pdf, *.swf, *.xml, etc). If anyone can think of a cleaner way to implement this then using "or", I'd be interested (please keep in mind any performance hits associated with using match or switch satements).
Thanks again!!