| FRAMES | NO FRAMES | Description | Parameters | Response | 
| URL | http://<admin-url>/system/handlers/rest/cache/clear | 
|---|
The clear REST cache operation. This operation explicitly clears the REST API cache immediately.
Clients need a security token to clear the REST cache. You can get a security token by using the Generate Admin Token operation.
The clear REST cache operation supports the following parameters. If the folderName, serviceName and type parameters are not specified, the entire REST cache will be cleared.
| Parameter | Details | 
|---|---|
| f | Description: 
The response format. The default response format is html. Values: html | json | 
| folderName | Description: 
The name of a folder. If only the folderNameparameter is specified in the request, cache will be cleared for that folder.Example: folderName=CachedServices | 
| serviceName | Description: 
The service for which REST cache needs to be cleared. When providing a serviceName, also providetypeparameter.
If thefolderNameparameter is not set, the service is assumed to be in the root folder. REST cache will be cleared for the specified service and its folder.Example: serviceName=WorldElevation | 
| type | Description: 
Type of service. Example: type=MapServer | 
Example 1: Use security token generated using Generate Admin Token operation to clear the REST cache. This will clear the entire REST cache.
http://<host>/arcgis/admin/system/handlers/rest/cache/clear?token=89dw7r0jfFDKWgDa7bZHVvttqiEv7sX7UnOH1oe_Mz-qqQ6oDg..&f=jsonExample 2: Clear cache for a specific service and its folder - for example when a service is stopped.
http://<host>/arcgis/admin/system/handlers/rest/cache/clear?folderName=CachedServices&serviceName=WorldElevation&type=MapServer&token=89dw7r0jfFDKWgDa7bZHVvttqiEv7sX7UnOH1oe_Mz-qqQ6oDg..&f=jsonExample 3: Clear a folder cache, for example after a new service is created.
http://<host>/arcgis/admin/system/handlers/rest/cache/clear?folderName=CachedServices&token=89dw7r0jfFDKWgDa7bZHVvttqiEv7sX7UnOH1oe_Mz-qqQ6oDg..&f=jsonExample 4: Clear root folder's cache, after a folder is added or removed.
http://<host>/arcgis/admin/system/handlers/rest/cache/clear?folderName=/&token=89dw7r0jfFDKWgDa7bZHVvttqiEv7sX7UnOH1oe_Mz-qqQ6oDg..&f=json
{
  "success": true //the value will always be true. Failure will result in an error response.
}
{
  "success": true
}