evict cached storage entries periodically

fixes synchronization issues if other applications write directly to the mail-entries in the mod-storage
This commit is contained in:
BuckarooBanzay 2024-01-13 18:00:23 +01:00 committed by Athozus
parent 94f37da092
commit 721d882c26

View File

@ -61,6 +61,9 @@ local function save_worker()
-- clear queue
save_queued_entries = {}
-- clear cached entries
cache = {}
-- save every second
minetest.after(1, save_worker)
end