Skip to content

Commit

Permalink
evict cached storage entries periodically
Browse files Browse the repository at this point in the history
fixes synchronization issues if other applications write directly to the mail-entries in the mod-storage
  • Loading branch information
BuckarooBanzay authored and Athozus committed Jan 13, 2024
1 parent 94f37da commit 721d882
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions storage.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 721d882

Please sign in to comment.