mirror of
https://github.com/mt-mods/mail.git
synced 2025-03-20 16:41:25 +00:00
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:
parent
94f37da092
commit
721d882c26
1 changed files with 3 additions and 0 deletions
|
@ -61,6 +61,9 @@ local function save_worker()
|
||||||
-- clear queue
|
-- clear queue
|
||||||
save_queued_entries = {}
|
save_queued_entries = {}
|
||||||
|
|
||||||
|
-- clear cached entries
|
||||||
|
cache = {}
|
||||||
|
|
||||||
-- save every second
|
-- save every second
|
||||||
minetest.after(1, save_worker)
|
minetest.after(1, save_worker)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue