• Document Up to Date

Statistics

Get the statistics for all cache scopes for the current site context.

Note

The result of this call can change based on the configuration of the system, for example when Crafter Engine is configured in preview mode the cache will be disabled and the result will always be an empty object. There could be also different statistics returned depending on the cache implementation that is being used.

Resource Information

This service uses the tomcat application on port 8080 by default. To see a list of default ports click here

The context for this API is /.

HTTP Verb
GET
URL
/api/1/site/cache/statistics
Response Formats
JSON, XML

Parameters

Name
Type
Required
Description
token
String
The authorization token

Example

Request

GET .../api/1/site/cache/statistics?token=defaultManagementToken

Response

Status 200 OK

{
  "size": 17,
  "localHeapSize": 17,
  "localOffHeapSize": 0,
  "localDiskSize": 0,
  "cacheHitRatio": 1,
  "cacheHitCount": 4,
  "cacheMissCount": 25,
  "cacheMissExpiredCount": 0,
  "cacheMissNotFoundCount": 25
}

Responses

Status
Location
Response Body
200

See example above.
400

{"message":"Required String parameter 'token' is not present"}
401

{"message":"Management authorization failed, invalid token."}
500

{ "message" : "Internal server error" }