mirror of
https://github.com/KumoCorp/kumomta.git
synced 2026-10-26 16:00:36 +00:00
We've been hoping that mkdocs-material will ship the much anticipated search enhancements for some time, but it's time to recognize that we need to do something to improve the search results with how things work right now. This is a big commit that changes the titles of the various pages from the code-annotated synopsis to just the name of the function. This makes it much easier now to match things like `kumo.reject` directly, but `reject` remains awkward to find. I think this is the best that we can do at this time. A few functions have been annotated with the `status: deprecated` to show as deprecated in the toc/nav (shows with a little trash can next to the name).
951 B
951 B
kumo.set_lruttl_cache_capacity
kumo.set_lruttl_cache_capacity(NAME, CAPACITY)
{{since('2025.03.19-1d3f1f67')}}
Allows you to configure the maximum capacity for a specific named pre-defined cache.
You may only update the capacity for caches defined inside kumomta's Rust code
via declare_cache!. Other caches are assumed to be dynamically created and
expose their capacity as part of their own individual configuration.
kumo.on('pre_init', function()
-- Increase the mx cache size from its default of 64*1024 to 128,000
kumo.set_lruttl_cache_capacity('dns_resolver_mx', 128000)
end)
!!! note
This function is intended to be used in pre_init, but it can be called
at any time. Reducing the capacity while the cache holds data will trigger
a partial eviction. The cache will eventually shrink to conform to the
new size as the cache is operated upon and background processing trims
the cache.