Forum Discussion
dan_6764
Nimbostratus
Feb 09, 2009Caching with an Irule issue
Hi,
I have a need to cache items that contain a certain uri and nothing else.
E.g I want to cache anything that has "f5" in it and let the rest pass through.
www.mydomain.com/f5/help - cache
www.mydomain.com/surround - don;t cache.
I an using a http-wan-optimized-compression-caching profile with the " http" as its parent. Ramcache is enabled.
My irule is as follows (applied to the relevant VIP, all that happens is that i cache everything. Can anyone help?
thanks
dan
when RULE_INIT {
set ::one_day 86400
}
when HTTP_REQUEST {
if { [HTTP::uri] contains "f5"} {
set cachetime $::one_day
} elseif { [HTTP::host] starts_with "http://" } {
CACHE::disable
}
}
2 Replies
- AndrewO_4840
Nimbostratus
The first problem is the line: - dan_6764
Nimbostratus
Hi Thanks for this... think i know what i now need to do.
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