Files
sing-box-extended-mirror/docs/configuration/experimental/cache-file.md
T

71 lines
1.3 KiB
Markdown
Raw Normal View History

2023-12-01 13:24:18 +08:00
!!! question "Since sing-box 1.8.0"
2026-04-11 12:10:52 +08:00
!!! quote "Changes in sing-box 1.14.0"
:material-delete-clock: [store_rdrc](#store_rdrc)
:material-plus: [store_dns](#store_dns)
2024-02-14 20:42:58 +08:00
!!! quote "Changes in sing-box 1.9.0"
:material-plus: [store_rdrc](#store_rdrc)
2025-12-26 16:20:27 +08:00
:material-plus: [rdrc_timeout](#rdrc_timeout)
2024-02-14 20:42:58 +08:00
2023-12-01 13:24:18 +08:00
### Structure
```json
{
"enabled": true,
"path": "",
"cache_id": "",
2024-02-14 20:42:58 +08:00
"store_fakeip": false,
"store_rdrc": false,
2026-04-11 12:10:52 +08:00
"rdrc_timeout": "",
"store_dns": false
2023-12-01 13:24:18 +08:00
}
```
### Fields
#### enabled
Enable cache file.
#### path
Path to the cache file.
`cache.db` will be used if empty.
#### cache_id
2024-02-14 20:42:58 +08:00
Identifier in the cache file
2023-12-01 13:24:18 +08:00
If not empty, configuration specified data will use a separate store keyed by it.
2024-02-14 20:42:58 +08:00
#### store_fakeip
Store fakeip in the cache file
#### store_rdrc
2026-04-11 12:10:52 +08:00
!!! failure "Deprecated in sing-box 1.14.0"
`store_rdrc` is deprecated and will be removed in sing-box 1.16.0, check [Migration](/migration/#migrate-store-rdrc).
2024-02-14 20:42:58 +08:00
Store rejected DNS response cache in the cache file
The check results of [Legacy Address Filter Fields](/configuration/dns/rule/#legacy-address-filter-fields)
2024-02-14 20:42:58 +08:00
will be cached until expiration.
#### rdrc_timeout
Timeout of rejected DNS response cache.
`7d` is used by default.
2026-04-11 12:10:52 +08:00
#### store_dns
!!! question "Since sing-box 1.14.0"
Store DNS cache in the cache file.