Forum Discussion
david78
Nimbostratus
Jun 12, 2013[RESOLV::lookup] How flush the cache ?
Hi,
i use[RESOLV::lookup], and i would like know how i can flush the DNS cache ?
thx
Bob_Vance_75936
Altostratus
Jun 14, 2013It'll depend on how you call RESOLV::lookup, but here's an example that's worked for me. Establish global variables and use them to determine when the last lookup was. Takes the current time on the LTM in seconds and checks if the last lookup was done within the last 30 seconds
when RULE_INIT {
set last_dns_request 0
set static::cache_dns 30
if { [clock seconds] - $::last_dns_request > $static::cache_dns } {
set ::last_dns_request [clock seconds]
set ips [RESOLV::lookup @8.8.4.4 www.google.com]
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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