Forum Discussion
CharlieMoad_142
Mar 04, 2014Nimbostratus
Bypass caching when a cookie matching a pattern is present
We have created an iRule which should disable caching for any request containing a cookie matching a pattern (starting with SESS). It seems like all the rules we have tried have no effect. When cachi...
IheartF5_45022
Mar 05, 2014Nacreous
Sorry totally forgot to paste correct rule 🙂
when CACHE_REQUEST {
log local0. "$uri"
}
when HTTP_REQUEST {
set fDisable 0
set c_cookies [HTTP::cookie names]
set uri [HTTP::uri]
log local0. "$uri"
if {[lsearch -regexp $c_cookies "SESS*"]} {
set fDisable 1
CACHE::disable
}
}
when CACHE_RESPONSE {
log local0. "$uri"
}
}
when HTTP_RESPONSE {
if {$fDisable} {
log local0. "$uri"
CACHE::disable
}
}
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