Response caching is a backend server caching mechanism that can increase performance and scalability of feature layers. Clients that support response caching, such as Map Viewer and ArcGIS Pro, can make requests for standardized extents of data for standard zoom levels. Because these standardized requests are identical between different clients that request the same data, the features can be cached and reused by multiple clients.
Response caching enables clients to receive a response faster without requiring the overhead of a database query. That makes response caching especially useful for layers that need to scale to a very high number of similar requests.
Prerequisites to using response caching
Layers in ArcGIS Enterprise do not use response caching by default, and not all types of layers can use response caching. To use response caching for a layer, the following prerequisites must be met:
- The hosting server must be configured with an object store. One option is to use ArcGIS Data Store to create an object store. Alternatively, for ArcGIS Enterprise deployments running in Amazon Web Services or Microsoft Azure, you can use a cloud storage service for the object store.
- The layer must be a hosted feature layer with data in the relational data store that has response caching enabled. Hosted feature layers with data in the spatiotemporal big data store are not supported for response caching.
- Requests on the layer must be made by a client that supports response caching. Primarily, these clients will be ArcGIS Pro, web apps created using the ArcGIS Maps SDK for JavaScript such as Map Viewer, and native applications built with the ArcGIS Maps SDKs.
Cache invalidation
Once a response is cached, it is only used for as long as it is valid. A cached response is invalidated whenever edits are made to the layer's data to prevent clients from receiving a response with outdated data. For that reason, response caching is best for read-only data or data that changes infrequently. You can also specify an expiration duration after which the cached response is automatically invalidated.