Skip to content

Metadata Cache

To improve the response time, OData Provider caches the service metadata once it is loaded from the database.

While maintaining the cache, OData Provider needs to make sure that the cached metadata is up-to-date. To do this, OData Provider validates the cached metadata version with that of the database each time when serving a request. If the validation fails, the request will fail with HTTP response code 503 and the response body will contain the error code as MI_MODIFIED_ERROR.

OData-Provider now invalidates the cached metadata, forcing it to be fetched from the database at the next request.

Response:

{
  "error": {
    "code": "MI_MODIFIED_ERROR",
    "message": "Cached Service metadata is outdated. Please try again."
  }
}

The Retry-After HTTP Header is also set in the response to notify the client that it can retry the request.

When a user gets this error response, the OData-Provider expects the user to retry the same request again. Then the OData-Provider will load the latest metadata from the database and serve the request accordingly.