See if this makes a difference - explicitly enabling/disabling CACHE from HTTP_RESPONSE - apologies in advance - I have taken some liberties with the format of your original iRule (although retained the logic I hope);-
when HTTP_REQUEST {
set fCache 0
switch -glob [string tolower [HTTP::host]] {
"someURL.test.co.uk" {
if { !([class match [IP::remote_addr] equals CUST_IP_Addresses])
and !([class match [IP::remote_addr] equals MIC_IP_Addresses])
and !([class match [IP::remote_addr] equals private_net]) } {
drop
return
} else {
CACHE::disable
pool "CUST-someURL.test.co.uk_[TCP::local_port]_POOL"
return
}
}
"someAURL.test.co.uk" {
pool "CUST-someAURL.test.co.uk_[TCP::local_port]_POOL"
}
"*test.co.uk" {
pool "CUST-www.test.co.uk_[TCP::local_port]_POOL"
}
"*test1.co.uk" {
pool "CUST-test1.co.uk_[TCP::local_port]_POOL"
}
default {
pool "CUST-test2.co.uk_[TCP::local_port]_POOL"
}
}
switch [getfield [string tolower [URI::basename [HTTP::path]]] "." 2] {
"js" -
"pdf" -
"css" -
"jpg" -
"png" {
enable the cache
CACHE::enable
set fCache 1
}
default {
disable the cache
CACHE::disable
}
}
}
when HTTP_RESPONSE {
if {$fCache} {
CACHE::enable
} else {
CACHE::disable
}
}