F5 AppWorld 2024 session proposal deadline extended to Friday, December 8th!
Problem this snippet solves:
Use iControlREST to delete the contents of a DNSCache cache. Example commands are provided to delete the "rrset cache" and "msg cache" associated with a Transparent or Resolver cache.
Please note that there is no difference in the URN between the Transparent and Resolver cache types.Please note that the "nameserver cache" is not deleted through this operation.
How to use this snippet:
The examples provided use the cURL utility. The command requires the correct partition and object name to work.
A Transparent DNSCache named "test_transparent_cache" and a Resolver DNSCache named "test_resolver_cache" were created in partition "/Common" and are used in the code snippet to follow.
Delete "Transparent Cache" Records:
curl -sk -u admin:admin -X DELETE https://10.10.40.5/mgmt/tm/ltm/dns/cache/records/rrset?options=cache+/Common/test_transparent_cache
Delete "Resolver Cache" Records:
curl -sk -u admin:admin -X DELETE https://10.10.40.5/mgmt/tm/ltm/dns/cache/records/rrset?options=cache+/Common/test_resolver_cache
Transparent Cache Records:
tmsh show ltm dns cache records rrset cache test_transparent_cache
tmsh show ltm dns cache records msg cache test_transparent_cache
Resolver Cache Records:
tmsh show ltm dns cache records rrset cache test_resolver_cache
tmsh show ltm dns cache records msg cache test_resolver_cache
Tested this on version: