Skip To Content
ArcGIS Developer
Dashboard

Compute Cache Info

  • URL:https://<imageservice-url>/computeCacheInfo
  • Required Capability:Image
  • Version Introduced:10.8.1

Description

The computeCacheInfo operation computes and generates new image service tile cache schemes for image services. It applies to image services that have dynamic service caching capability enabled (service property dynamicServiceCaching is true). It returns the image tile cache scheme information according to the parameters provided. If the corresponding image tile cache scheme is missing, it will also create a new set of cached image tiles in the cache directory of the image service. This operation only generates image tile cache schemes based on raster tiles (LERC2D format).

This image service operation is available if the image service uses ArcObjects11 or ArcObjectsRasterRendering as the service provider.

You can provide arguments to the computeCacheInfo operation as query parameters defined in the parameters table below.

Request parameters

ParameterDetails
outSR

The spatial reference for the output image tile cache scheme. It should be specified as a well-known ID. If not specified, it will use the spatial reference of the image service.

f

The response format. The default response format is html.

Values: html | json | pjson

Example usage

Below is a sample request URL that demonstrates how to generate image tile cache scheme info under spatial reference WKID 3395:

https://machine.domain.com/webadaptor/rest/services/myservice/ImageServer/computeCacheInfo?outSR=3395&f=html

JSON Response syntax


{
  "cacheInfo": {
    "tileInfo": <>, //the tile scheme info such as tile size, origin, level of details, tile format…
    "extent": <extent>, //the extent object for the whole image tile cache
    "cacheType": "Raster" //the image tile cache type must be “raster” for LERC2D format raster tiles
  }
}

JSON Response example


{
  "cacheInfo": {
    "tileInfo": {
      "rows": 256,
      "cols": 256,
      "dpi": 96,
      "format": "LERC2D",
      "compressionQuality": 0,
      "lercError": 0.5,
      "origin": {
        "x": -3341208.125026152,
        "y": 4840582.346920394
      },
      "spatialReference": {
        "wkid": 3395,
        "latestWkid": 3395
      },
      "lods": [
        {
          "level": 0,
          "resolution": 79160.5287031515,
          "scale": 2.991888014441351E8
        },
        {
          "level": 1,
          "resolution": 39580.26435157575,
          "scale": 1.4959440072206756E8
        },
        {
          "level": 2,
          "resolution": 19790.132175787876,
          "scale": 7.479720036103378E7
        },
        {
          "level": 3,
          "resolution": 9895.066087893938,
          "scale": 3.739860018051689E7
        },
        {
          "level": 4,
          "resolution": 4947.533043946969,
          "scale": 1.8699300090258446E7
        },
        {
          "level": 5,
          "resolution": 2473.7665219734845,
          "scale": 9349650.045129223
        },
        {
          "level": 6,
          "resolution": 1236.8832609867422,
          "scale": 4674825.022564611
        },
        {
          "level": 7,
          "resolution": 618.4416304933711,
          "scale": 2337412.5112823057
        },
        {
          "level": 8,
          "resolution": 309.22081524668556,
          "scale": 1168706.2556411528
        },
        {
          "level": 9,
          "resolution": 154.61040762334278,
          "scale": 584353.1278205764
        }
      ]
    },
    "extent": {
      "xmin": -3341208.125026152,
      "ymin": -8365323.728407516,
      "xmax": 7348400.847644144,
      "ymax": 4840582.346920392,
      "spatialReference": {
        "wkid": 3395,
        "latestWkid": 3395
      }
    },
    "cacheType": "Raster"
  }
}