F5 清除http 缓存

Topic
This article applies to BIG-IP 11.x and later. For information about other versions, refer to the following article:

K10200: Displaying and deleting RAM Cache entries from the command line (9.x - 10.x)
You can display and delete the contents of the BIG-IP HTTP cache from the command line using the tmsh ramcache command. In addition to the following examples, the ramcache command includes a number of other options that you can use to display or delete only those HTTP cache entries that correspond to specific URIs, URI branches, or hosts. For more information about using the TMOS Shell (tmsh) to manipulate HTTP cache entries, refer to the Traffic Management Shell (tmsh) Reference Guide.

Note: For information about how to locate F5 product manuals, refer to K12453464: Finding product documentation on AskF5.

Note: The Configuration utility does not have a corresponding feature where you can display or delete cache setting entries. F5 Product Development is tracking a request to add this functionality as ID 222227 (formerly CR115374).

Displaying entries

To display the HTTP cache entries for a particular Web Acceleration profile, use the following tmsh command syntax:

tmsh show /ltm profile ramcache <profilename> max-response <value>

Note: Without the max-response option, the show ltm profile ramcache command will only display 10 entries per Traffic Management Microkernel (TMM).

For example, to display 1,000 HTTP cache entries for the MyRamCache profile, you would type the following command:

tmsh show /ltm profile ramcache MyRamCache max-response 1000

To display the cached entries for a specific virtual server when the Web Acceleration profile is used by more than on virtual server configuration, use the following tmsh command syntax:

tmsh show /ltm  profile ramcache <profilename> host <virtual server address>:<port>

For example:

tmsh show /ltm profile ramcache my_cache_profile host 192.168.0.10:99

Note: The previous example displays the cache entries for the virtual server using the ip address of 192.168.0.10 listening on port 99. that is configured with the Web Acceleration profile my_cache_profile:

tmsh show /ltm profile ramcache my_cache_profile host 192.168.0.10

Note: The previous example displays the cache entries for all virtual servers using the ip address of 192.168.0.10 that are configured with the Web Acceleration profile my_cache_profile.

Note: You do not have to specify the virtual server port :<port> when there are no other virtual server addresses:port combinations configured with the same Web Acceleration profile.

Deleting entries

To delete a specific cache entity of a specific Web Acceleration profile, use the following tmsh command syntax:

tmsh delete /ltm profile ramcache <profilename> host <virtual server address> uri /<object name>

For example:

tmsh delete /ltm profile ramcache my_cache_profile host 192.168.0.10 uri /f5.jpg

Note: When a path is supplied but no specific object name all cached objects of the path will be removed from the cache.

To delete all HTTP cache entries for a specific Web Acceleration profile, use the following tmsh command syntax:

tmsh delete /ltm profile ramcache <profilename>

In the previous command syntax, <profilename> is the name of the Web Acceleration profile for which you want to view the cache.

For example, to delete all the HTTP cache entries for the MyRamCache profile, type the following command:

tmsh delete /ltm profile ramcache MyRamCache
原文地址:https://www.cnblogs.com/zy09/p/13412382.html