Skip to content

Cache

Configures in-memory cache sizes for data, DNS records, and authorization tokens.

This object can be configured from the WebUI under Settings › Storage › Cache

Type: Size · default: "10mb" · min: 2048

Maximum size of the access tokens cache

Type: Size · default: "10mb" · min: 2048

Maximum size of the address books and contacts cache

Type: Size · default: "5mb" · min: 2048

Maximum size of the IPv4 record cache

Type: Size · default: "5mb" · min: 2048

Maximum size of the IPv6 record cache

Type: Size · default: "1mb" · min: 2048

Maximum size of the MTA-STS record cache

Type: Size · default: "5mb" · min: 2048

Maximum size of the MX record cache

Type: Size · default: "1mb" · min: 2048

Maximum size of the PTR record cache

Type: Size · default: "5mb" · min: 2048

Maximum size of the DNSBl record cache

Type: Size · default: "1mb" · min: 2048

Maximum size of the TLSA record cache

Type: Size · default: "5mb" · min: 2048

Maximum size of the TXT record cache

Type: Size · default: "10mb" · min: 2048

Maximum size of the calendar and events cache

Type: Size · default: "1mb" · min: 2048

Maximum size of the scheduling cache

Type: Size · default: "10mb" · min: 2048

Maximum size of the file storage data cache

Type: Size · default: "1mb" · min: 2048

Maximum size of the HTTP authorization headers cache

Type: Size · default: "50mb" · min: 2048

Maximum size of the e-mail data cache

Type: Size · default: "5mb" · min: 2048

Maximum size of the domains cache

Type: Size · default: "10mb" · min: 2048

Maximum size of the domain name lookup cache

Type: Size · default: "1mb" · min: 2048

Maximum size of the domain name lookup negative cache

Type: Size · default: "10mb" · min: 2048

Maximum size of the email addresses lookup cache

Type: Size · default: "2mb" · min: 2048

Maximum size of the email addresses lookup negative cache

Type: Size · default: "20mb" · min: 2048

Maximum size of the accounts cache

Type: Size · default: "5mb" · min: 2048

Maximum size of the roles cache

Type: Size · default: "5mb" · min: 2048

Maximum size of the tenants cache

Type: Size · default: "2mb" · min: 2048

Maximum size of the mailing lists cache

Type: Size · default: "10mb" · min: 2048

Maximum size of the DKIM signatures cache

Type: Duration · default: "1h"

Time-to-live for domain and account name lookup negative cache entries

The Cache singleton is available via the urn:stalwart:jmap capability.

This is a standard Foo/get method as defined in RFC 8620, Section 5.1.

For singletons, the ids argument should be the literal singleton (or null to return the single instance).

This method requires the sysCacheGet permission.

Terminal window
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:Cache/get",
{
"ids": [
"singleton"
]
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'

This is a standard Foo/set method as defined in RFC 8620, Section 5.3.

For singletons, only the update argument with id singleton is accepted; create and destroy arguments are rejected.

This method requires the sysCacheUpdate permission.

Terminal window
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:Cache/set",
{
"update": {
"singleton": {
"accessTokens": "10mb"
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'

stalwart-cli wraps the same JMAP calls. See the CLI reference for installation, authentication, and general usage.

Terminal window
stalwart-cli get Cache
Terminal window
stalwart-cli update Cache --field accessTokens=10mb