Introduce DNS cache table

Only used for IMAP connections currently.
This commit is contained in:
link2xt
2023-01-19 16:17:31 +00:00
parent ed20a23297
commit 773754d74f
4 changed files with 107 additions and 12 deletions

View File

@@ -671,6 +671,19 @@ CREATE INDEX smtp_messageid ON imap(rfc724_mid);
)
.await?;
}
if dbversion < 97 {
sql.execute_migration(
"CREATE TABLE dns_cache (
hostname TEXT NOT NULL,
port INTEGER NOT NULL,
address TEXT NOT NULL,
timestamp INTEGER NOT NULL,
UNIQUE (hostname, port, address)
)",
97,
)
.await?;
}
let new_version = sql
.get_raw_config_int(VERSION_CFG)