Forum Discussion
Mike_62629
Nimbostratus
Apr 07, 2008Has anyone successfully used dicts in iRules?
Has anyone successfully used dicts in iRules?
I'm currently iterating through a loop doing string comparisons and think it may be a bit more efficient to do a single dictionary lookup instead. I w...
Mike_62629
Nimbostratus
Apr 08, 2008Yeap, thanks. I kept reading the matchclass wiki page and found out about data groups. What mislead me to think it was to be implemented in code was the fact that it includes a snippet of what the data group ends up looking like in the bigip.conf file. Skimming the doc made me think I had to code it somewhere.
As to dict being implemented in 8.5, thats what I thought was the problem, but couldn't find anything that would definitively state the version of TCL used in the BigIp. Thanks for the info, and to everyone who commented, thanks for the help.
For those wondering, I ended up with two classes:
class CacheableExtensions {
.css
.js
.gif
*SNIP*
.jpg
}
class CacheableDirs {
/user/docs/
/user/images/
/user/videos/
}
when HTTP_REQUEST {
if { [matchclass [string tolower [HTTP::path]] starts_with $::CacheableDirectories] } {
pool Cache-Pool
} elseif { [matchclass [string tolower [HTTP::path]] ends_with $::CacheableExtensions] } {
pool Cache-Pool
} else {
pool Application-Pool
}
}
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