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/Legal/img/foot_back_bot.png
So I assume my syntax must be off since it "should" be caching the .png as per my irule.
when HTTP_REQUEST {
set debug 1
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} { log local0. "Caching [HTTP::uri]" }
CACHE::enable }
else {CACHE::disable }
}
when CACHE_REQUEST { log local0. "[CACHE::hits] cache hits [HTTP::uri]" }
Thanks for any input