---
url: https://axios-cache-interceptor.js.org/config/response-object.md
---
# Response object

Axios Cache Interceptor adds a few cache-related properties to the standard axios response.

## id

* Type: `string`

The [Request ID](../guide/request-id.md) used in this request.

It was either generated by the [key generator](../guide/request-id.md#custom-generator) or
provided through [`config.id`](./request-specifics.md#id).

```ts
const response = await axios.get('url', { id: 'my-overridden-id' });

// This request used 'my-overridden-id' instead of
// the ID the key generator would have produced
response.id === 'my-overridden-id';
```

## cached

* Type: `boolean`

Whether the response data came from the cache (`true`) or from the network (`false`). A
`304 Not Modified` revalidation also returns `true`, because the data comes from the existing
cache entry.

::: tip

This does not tell you whether the request could have been cached. Options such as
[`cache.override`](./request-specifics.md#cache-override) make a network request even when a
cached response exists.

:::

## stale

* Type: `boolean | undefined`

`true` when the response was served from a stale entry, for example when
[`cache.staleIfError`](./request-specifics.md#cache-staleiferror) returned cached data after
a failed request. It is also `true` for requests that waited on a concurrent revalidation of
a stale entry. It is `false` for fresh cache hits and `undefined` for network responses,
including `304` revalidations.
