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

68 lines
1.3 KiB
Markdown
Raw Normal View History

2023-12-03 14:53:22 +08:00
!!! question "自 sing-box 1.8.0 起"
2026-04-11 12:10:52 +08:00
!!! quote "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 "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-03 14:53:22 +08:00
### 结构
```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-03 14:53:22 +08:00
}
```
### 字段
#### enabled
启用缓存文件。
#### path
缓存文件路径,默认使用`cache.db`。
#### cache_id
缓存文件中的标识符。
如果不为空,配置特定的数据将使用由其键控的单独存储。
2024-02-14 20:42:58 +08:00
#### store_fakeip
将 fakeip 存储在缓存文件中。
#### store_rdrc
2026-04-11 12:10:52 +08:00
!!! failure "已在 sing-box 1.14.0 废弃"
`store_rdrc` 已在 sing-box 1.14.0 废弃,且将在 sing-box 1.16.0 中被移除,参阅[迁移指南](/zh/migration/#迁移-store_rdrc)。
2024-02-14 20:42:58 +08:00
将拒绝的 DNS 响应缓存存储在缓存文件中。
[旧版地址筛选字段](/zh/configuration/dns/rule/#旧版地址筛选字段) 的检查结果将被缓存至过期。
2024-02-14 20:42:58 +08:00
#### rdrc_timeout
拒绝的 DNS 响应缓存超时。
默认使用 `7d`。
2026-04-11 12:10:52 +08:00
#### store_dns
!!! question "自 sing-box 1.14.0 起"
将 DNS 缓存存储在缓存文件中。