Software / code / prosody
Comparison
plugins/mod_storage_internal.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 |
| parent | 13187:fe1229919070 |
| child | 13228:616c578c644f |
comparison
equal
deleted
inserted
replaced
| 13212:3e6e98cc63e9 | 13213:50324f66ca2a |
|---|---|
| 9 local set = require "prosody.util.set"; | 9 local set = require "prosody.util.set"; |
| 10 local it = require "prosody.util.iterators"; | 10 local it = require "prosody.util.iterators"; |
| 11 | 11 |
| 12 local host = module.host; | 12 local host = module.host; |
| 13 | 13 |
| 14 local archive_item_limit = module:get_option_number("storage_archive_item_limit", 10000); | 14 local archive_item_limit = module:get_option_integer("storage_archive_item_limit", 10000, 0); |
| 15 local archive_item_count_cache = cache.new(module:get_option("storage_archive_item_limit_cache_size", 1000)); | 15 local archive_item_count_cache = cache.new(module:get_option("storage_archive_item_limit_cache_size", 1000)); |
| 16 | 16 |
| 17 local use_shift = module:get_option_boolean("storage_archive_experimental_fast_delete", false); | 17 local use_shift = module:get_option_boolean("storage_archive_experimental_fast_delete", false); |
| 18 | 18 |
| 19 local driver = {}; | 19 local driver = {}; |