Forum Discussion
Sashi_81625
Nimbostratus
Sep 01, 2010need to optimize search block
In my iRule, i have below block. Can someone please optimize this code. My concern is that "static::payld" may store few 100 URLs, and iterating over these URLs will impact the performance.
foreach pl_uri $static::payld {
if { ([HTTP::uri] starts_with $pl_uri) and not( $pl_uri equals "" ) } {
log local0. "Redirect: For [HTTP::uri] matched $pl_uri"
set redirect 1
break
}
}
- Sashi_81625
Nimbostratus
Found out that we can use matchclass method on lists too... pretty cool. above code is replaced as
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