2.6 Purge Access Gateway Cache

You can use this API to purge the Access Gateway server cache. Periodic purging of the cache frees up storage. You can select to purge the content of the purge list that has already been configured on Administration Console or purge all content cached on the server.

Perform the following steps:

  1. Get the list of Access Gateway clusters.

    Sample URL: https://164.99.86.7:8443/amsvc/v1/agclusters

  2. Parse the response to get the URL of the cluster you want to purge.

    Sample Response:

    <agCluster uri="https://164.99.86.7:8443/amsvc/v1/agclusters/ce035b033e6c7f29">
  3. Invoke the URL to get the devices in that cluster.

    URL format: <cluster uri from above>/devices

    Sample URL: https://164.99.86.7:8443/amsvc/v1/agclusters/ce035b033e6c7f29 devices

  4. Parse the response to get the URL of the device you want to purge

    Sample Response:

    <agDevice uri="https://164.99.86.7:8443/amsvc/v1/agclusters/ce035b033e6c7f29/devices/ag-6459CF981F6FD178">
  5. Send a PUT request to the device URL with parameters to purge cache.

Sample Request

PUT request to https://164.99.86.7:8443/amsvc/v1/agclusters/ce035b033e6c7f29/devices/ag-6459CF981F6FD178

With input { "purge" : "list" }

Specify "list" to purge the content configured in the Purge List on the UI.

Use "all" to purge the entire cache.

Response: 200 OK

NOTE:Clearing the cache decreases the responsiveness of a device, as every page will need to be retrieved. Therefore, it is recommended to execute this command for one device at a time.