Software / code / prosody
Comparison
plugins/mod_storage_sql.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 | 13190:9dc6de46dae3 |
| child | 13221:2a9ce229efac |
comparison
equal
deleted
inserted
replaced
| 13212:3e6e98cc63e9 | 13213:50324f66ca2a |
|---|---|
| 150 return iterator(result); | 150 return iterator(result); |
| 151 end | 151 end |
| 152 | 152 |
| 153 --- Archive store API | 153 --- Archive store API |
| 154 | 154 |
| 155 local archive_item_limit = module:get_option_number("storage_archive_item_limit"); | 155 local archive_item_limit = module:get_option_integer("storage_archive_item_limit", nil, 0); |
| 156 local archive_item_count_cache = cache.new(module:get_option("storage_archive_item_limit_cache_size", 1000)); | 156 local archive_item_count_cache = cache.new(module:get_option("storage_archive_item_limit_cache_size", 1000)); |
| 157 | 157 |
| 158 local item_count_cache_hit = module:measure("item_count_cache_hit", "rate"); | 158 local item_count_cache_hit = module:measure("item_count_cache_hit", "rate"); |
| 159 local item_count_cache_miss = module:measure("item_count_cache_miss", "rate") | 159 local item_count_cache_miss = module:measure("item_count_cache_miss", "rate") |
| 160 | 160 |