Forum Discussion
Darren_Person_2
Nimbostratus
May 07, 2007Image Leeching / Random querystring fix?
Hi All,
We have the RAMCACHE module installed and are seeing a high rate of evictions. After some further investigation, it appears that we have someone linking to our images using a random...
Darren_Person_2
Nimbostratus
May 11, 2007Hi 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!!
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects