Caching asynchronous requests

Ops Center Analyzer Detail View REST API Reference Guide

Part Number

The response of an asynchronous job is cached in the API server. To control the memory consumption, the responses are cached for 3600 seconds (1 hour). The response cached time can be configured through the property:

The following retention policy is for a cached response:
  • Cached response are saved for 1 hour after the request processing is completed.
  • The response are deleted from cache after the response is sent to the client on receiving the getStatus request.
A getStatus request on deleted response returns the 404 NOT FOUND error.

  1. The client sends Request R1 at time (t1) to the API server.
  2. The API server starts processing the request, after the time frame that is specified in the x-waitTime , and the request is processed asynchronously. The API server returns response with status code 206.
  3. While request R1 is not processed completely, the client sends a status request for R1 at time (t1 + m) will get back response with status code 206.
  4. When the request R1 is completed, the response for request will be cached and same will be returned when client sends a status request for R1.
  5. The client sends status request for R1 at time (t1 + m + n), where n is less than retention time frame then the response is returned from the cache. After returning the response to the client, response is deleted from the cache.
  6. Similarly, the client sends request R2 at t2 and the request is completed at time (t2 + x), then response data is added in the cache.
  7. At time (t2 + x + y), the cached response is deleted from the cache, as it exceeds the retention policy time frame ( y >= Retention time frame).
  8. The client sends the getStatus request for request R2 at time (t2 + x + y + z) and the API server returns the error 400, because the response for request R2 is deleted from cache.