Forum Discussion
Phil_53695
Aug 18, 2011Nimbostratus
Cache hits show 0 on irule when looking at ltm log
Hi,
Below is an irule that I am trying to debug to see if indeed the URI(s) file types get cached and nothing else.
From viewing the ltm log, I see: : 0 cache hits /Public/Lega...
when HTTP_REQUEST {
The below irule will log to the ltm logfile so can tail -f it to see the actual files.
Logging can be removed afterwards then.
set foundmatch 0
if { ([HTTP::uri] contains ".swf") or ([HTTP::uri] contains ".js") or ([HTTP::uri] contains ".css") or ([HTTP::uri] contains ".png") or ([HTTP::uri] contains ".jpeg") or ([HTTP::uri] contains ".jspg") or ([HTTP::uri] contains ".gif")} {
if {$foundmatch == 1} { log local0. "Caching [HTTP::uri]" }
CACHE::enable }
else {CACHE::disable }
}
when CACHE_REQUEST { log local0. "[CACHE::hits] cache hits [HTTP::uri]" }
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