Mercurial > prosody-hg
diff plugins/mod_storage_memory.lua @ 13213:50324f66ca2a
plugins: Use integer config API with interval specification where sensible
Many of these fall into a few categories:
- util.cache size, must be >= 1
- byte or item counts that logically can't be negative
- port numbers that should be in 1..0xffff
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Mon, 17 Jul 2023 01:38:54 +0200 |
| parents | 74b9e05af71e |
| children | 159047a453f2 |
line wrap: on
line diff
--- a/plugins/mod_storage_memory.lua Mon Jul 17 00:37:44 2023 +0200 +++ b/plugins/mod_storage_memory.lua Mon Jul 17 01:38:54 2023 +0200 @@ -9,7 +9,7 @@ local auto_purge_enabled = module:get_option_boolean("storage_memory_temporary", false); local auto_purge_stores = module:get_option_set("storage_memory_temporary_stores", {}); -local archive_item_limit = module:get_option_number("storage_archive_item_limit", 1000); +local archive_item_limit = module:get_option_integer("storage_archive_item_limit", 1000, 0); local memory = setmetatable({}, { __index = function(t, k)
