Forum Discussion
David_Patino_20
May 04, 2012Nimbostratus
Instructing BigIP to expire RAM Cache when it receives a URL Query
Howdy Everyone.
I've an issue I've been working on.
I'm trying to develop a irule that will check the URI::query for an expire entry. If it finds one, it will instruct the system to do a CACHE...
hooleylist
May 04, 2012Cirrostratus
Hi David,
Can you try this without the redirect? Also, you can parse the URI without the query string using HTTP::path. To get just the query string you can use HTTP::query.
when HTTP_REQUEST {
Disable cache for a defined set of folders
if { [class match [HTTP::uri] contains folders_to_not_cache] }{
CACHE::disable
return
}
if { [string tolower [HTTP::query]] starts_with "expire" } {
log "Request to expire [HTTP::path] received."
set expire_cache_trigger 1
Remove the query string from the URI
HTTP::uri [HTTP::path]
}
}
when CACHE_REQUEST {
if { ( [info exists expire_cache_trigger] ) && ( $expire_cache_trigger==1 ) } {
CACHE::expire
log "Cache Expired"
unset expire_cache_trigger
}
}
Aaron
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