plugins/mod_pep.lua
branch0.11
changeset 12091 19f67d44ec37
parent 12090 1dc00ca6ee9d
child 12092 e5028f6eb599
equal deleted inserted replaced
12090:1dc00ca6ee9d 12091:19f67d44ec37
    31 	if item then
    31 	if item then
    32 		module:remove_item("pep-service", item);
    32 		module:remove_item("pep-service", item);
    33 	end
    33 	end
    34 end):table();
    34 end):table();
    35 
    35 
       
    36 -- size of caches with smaller objects
       
    37 local info_cache_size = module:get_option_number("pep_info_cache_size", 10000);
       
    38 
    36 -- username -> recipient -> set of nodes
    39 -- username -> recipient -> set of nodes
    37 local recipients = {};
    40 local recipients = cache.new(info_cache_size):table();
    38 
    41 
    39 -- caps hash -> set of nodes
    42 -- caps hash -> set of nodes
    40 local hash_map = {};
    43 local hash_map = cache.new(info_cache_size):table();
    41 
    44 
    42 local host = module.host;
    45 local host = module.host;
    43 
    46 
    44 local node_config = module:open_store("pep", "map");
    47 local node_config = module:open_store("pep", "map");
    45 local known_nodes = module:open_store("pep");
    48 local known_nodes = module:open_store("pep");