service.flushCache
Description
Flushes the content cache for a given service.
Parameters
service key
A string representing the unique id of the service to clear the cache for. You may also pass a json object with a field of service_key to identify the service you wish to fetch.
Response
array|object — Object describing the service's content cache status after it was flushed.
Examples
A Sample JSON-RPC Service Flush Cache Request
{
"method": "service.flushCache",
"params": [
"your_service_key_here"
],
"id": 1
}
The JSON-RPC Response
{
"result": {
"cache_expiry_times": [
{
"*": 1440
}
],
"cache_batch": 1
},
"error": null,
"id": 1
}
Permissions Required
The user who owns the key used to authenticate the service.flushCache call must be a member of one of the following roles
- Administrator
- Api Manager
See authentication.
Errors
In addition to the standard json-rpc errors and authentication errors, service.getCacheStatus may also return these errors:
| HTTP Status Code | JSON-RPC Code | Error Message | Description |
|---|---|---|---|
| 400 | 1002 | Field "id" is required | You've passed an object to trigger the alternative object identifier syntax, but that object does not contain an id field. |
| 400 | 5000 | Object "type" with "key" of "value" could not be found | The object could not be updated because it could not be found. |
Docs Navigation
- Support Documentation Portal
- Mashery API Documentation
- Mashery 2.0 API Guide
- Examples
- API Sandbox
- JSON RPC
- Authentication
- API Objects
- Fetching Objects
- Query Language
- Creating Objects
- Updating Objects
- Validating Fields
- Deleting Objects
- Applications
- General Object Methods
- Members
- Packages
- Plans
- Package Keys
- Keys
- Developer Classes
- Services
- Roles
- Mashery 2.0 Reporting API Guide
- Mashery 1.0 API Guide
- Mashery 2.0 API Guide
- Tips and Tricks
- Customizing Your Portal
- API Traffic Manager