Forum Discussion
Bijan_141511
Jan 28, 2014Nimbostratus
iRule RAM CACHE odd behaviour
Hi,
I am trying to cache and serve some content from the static contents of my .Net app. I have enabled the Cache on the HTTP profile, and applied the following rule to my Virtual Server:-
when HTT...
IheartF5_45022
Nacreous
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
}
}
Bijan_141511
Jan 30, 2014Nimbostratus
no difference :( i suspect perhaps the RAM CACHE to be at fault in some way, either it has run out of space or it has some limitation that i am unaware of. I have added more sites to the RAM CACHE, they simply aren't doing anything now, when i log cache request or response, not a sausage.
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