# HG changeset patch # User Kim Alvefur # Date 1626901345 -7200 # Node ID bc2d3f110a39cdfc80fd38b6c892305a7e5c701e # Parent 7a77f0c05382dee2e8e634cc42cba504a82b7b00 mod_pep: Remove use of RLU cache when persist_items was set to false This behavior came from some confusion over the meaning of persist_items. The correct behavior is that items are only stored when it is set to true. When set to false, the service becomes a "pure" publish-subscribe service, where items are forgotten immediately after broadcasting. diff -r 7a77f0c05382 -r bc2d3f110a39 plugins/mod_pep.lua --- a/plugins/mod_pep.lua Thu Jul 22 21:01:11 2021 +0200 +++ b/plugins/mod_pep.lua Wed Jul 21 23:02:25 2021 +0200 @@ -110,14 +110,9 @@ local driver = storagemanager.get_driver(module.host, "pep_data"); return function (config, node) local max_items = tonumber_max_items(config["max_items"]); - if config["persist_items"] then - module:log("debug", "Creating new persistent item store for user %s, node %q", username, node); - local archive = driver:open("pep_"..node, "archive"); - return lib_pubsub.archive_itemstore(archive, max_items, username, node, false); - else - module:log("debug", "Creating new ephemeral item store for user %s, node %q", username, node); - return cache.new(max_items); - end + module:log("debug", "Creating new persistent item store for user %s, node %q", username, node); + local archive = driver:open("pep_"..node, "archive"); + return lib_pubsub.archive_itemstore(archive, max_items, username, node, false); end end