> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-3a82795f.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> System table containing information about cached DNS records.

# system.dns_cache

<Info>
  **Querying in ClickHouse Cloud**

  The data in this system table is held locally on each node in ClickHouse Cloud. Obtaining a complete view of all data, therefore, requires the `clusterAllReplicas` function. See [here](/reference/system-tables/overview#system-tables-in-clickhouse-cloud) for further details.
</Info>

<h2 id="description">
  Description
</h2>

Contains information about cached DNS records.

<h2 id="columns">
  Columns
</h2>

* `hostname` ([String](/reference/data-types)) — Hostname.
* `ip_address` ([String](/reference/data-types)) — IP address.
* `ip_family` ([Enum8('IPv4' = 0, 'IPv6' = 1, 'UNIX\_LOCAL' = 2)](/reference/data-types)) — IP address family.
* `cached_at` ([DateTime](/reference/data-types)) — Record cached timestamp.

<h2 id="example">
  Example
</h2>

```sql title="Query" theme={null}
SELECT * FROM system.dns_cache;
```

| hostname  | ip\_address | ip\_family | cached\_at          |
| :-------- | :---------- | :--------- | :------------------ |
| localhost | ::1         | IPv6       | 2024-02-11 17:04:40 |
| localhost | 127.0.0.1   | IPv4       | 2024-02-11 17:04:40 |

<h2 id="see-also">
  See also
</h2>

* [disable\_internal\_dns\_cache setting](/reference/settings/server-settings/settings#disable_internal_dns_cache)
* [dns\_cache\_max\_entries setting](/reference/settings/server-settings/settings#dns_cache_max_entries)
* [dns\_cache\_update\_period setting](/reference/settings/server-settings/settings#dns_cache_update_period)
* [dns\_max\_consecutive\_failures setting](/reference/settings/server-settings/settings#dns_max_consecutive_failures)
