# HG changeset patch # User Matthew Wild # Date 1458295182 0 # Node ID ba42c88820267a03a332faf4a2964efe116eb937 # Parent 9239893a24003c2af81710355c7fff3b7e746d1e mod_firewall: Fix another unprotected use of util.cache diff -r 9239893a2400 -r ba42c8882026 mod_firewall/definitions.lib.lua --- a/mod_firewall/definitions.lib.lua Fri Mar 18 09:57:09 2016 +0000 +++ b/mod_firewall/definitions.lib.lua Fri Mar 18 09:59:42 2016 +0000 @@ -6,7 +6,6 @@ local set = require"util.set"; local new_throttle = require "util.throttle".create; -local new_cache = require "util.cache".new; local multirate_cache_size = module:get_option_number("firewall_multirate_cache_limit", 1000); @@ -39,7 +38,7 @@ end; multi = function () - local cache = new_cache(max_throttles, evict_only_unthrottled); + local cache = require "util.cache".new(max_throttles, evict_only_unthrottled); return { poll_on = function (_, key, amount) assert(key, "no key"); @@ -59,3 +58,4 @@ end return definition_handlers; +