mirror of
https://github.com/minetest-mods/mesecons.git
synced 2024-11-14 14:20:33 +01:00
Make FPGA cache max age configurable
This commit is contained in:
parent
4948ebb8be
commit
5a403ed703
|
@ -330,9 +330,10 @@ plg.compile_with_cache = function(instr)
|
|||
end
|
||||
|
||||
-- Entries are removed from the cache if they are unused for at least a minute.
|
||||
local compile_cache_max_age = mesecon.setting("fpga_cache_max_age", 1)
|
||||
local function clean_compile_cache()
|
||||
for instr, entry in pairs(compile_cache) do
|
||||
if entry.age < 1 then
|
||||
if entry.age < compile_cache_max_age then
|
||||
entry.age = entry.age + 1
|
||||
else
|
||||
compile_cache[instr] = nil
|
||||
|
|
|
@ -17,6 +17,12 @@ mesecon.detector_radius (Player detector scanning radius) int 6 3 16
|
|||
mesecon.node_detector_distance_max (Node detector distance limit) int 10 1 16
|
||||
|
||||
|
||||
[mesecons_fpga]
|
||||
|
||||
# The minimum time in minutes that unused cached FPGA configurations will be kept around.
|
||||
mesecon.fpga_cache_max_age (Compile cache max age) int 1 0 10
|
||||
|
||||
|
||||
[mesecons_luacontroller]
|
||||
|
||||
mesecon.luacontroller_string_rep_max (string:rep result length limit) int 64000 1000 1000000
|
||||
|
|
Loading…
Reference in New Issue
Block a user