Software / code / prosody
Comparison
plugins/mod_storage_sql.lua @ 13223:b88b3e414550
mod_storage_sql: Use integer config option for cache size
Missed this one, was probably only looking for get_option_number
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 18 Jul 2023 11:53:31 +0200 |
| parent | 13222:cb6a17eaa0e6 |
| child | 13229:bb7177efbf41 |
comparison
equal
deleted
inserted
replaced
| 13222:cb6a17eaa0e6 | 13223:b88b3e414550 |
|---|---|
| 151 end | 151 end |
| 152 | 152 |
| 153 --- Archive store API | 153 --- Archive store API |
| 154 | 154 |
| 155 local archive_item_limit = module:get_option_integer("storage_archive_item_limit", nil, 0); | 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_integer("storage_archive_item_limit_cache_size", 1000, 1)); |
| 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 |
| 161 -- luacheck: ignore 512 431/user 431/store 431/err | 161 -- luacheck: ignore 512 431/user 431/store 431/err |