Diff

mod_storage_gdbm/mod_storage_gdbm.lua @ 1756:c619425dafe7

mod_storage_gdbm: Reorganize (vacuum) databases on module unload
author Kim Alvefur <zash@zash.se>
date Tue, 19 May 2015 23:30:39 +0200
parent 1754:c04d10557bbc
child 1760:e72f9eac51c8
line wrap: on
line diff
--- a/mod_storage_gdbm/mod_storage_gdbm.lua	Tue May 19 23:29:37 2015 +0200
+++ b/mod_storage_gdbm/mod_storage_gdbm.lua	Tue May 19 23:30:39 2015 +0200
@@ -170,6 +170,7 @@
 function module.unload()
 	for db_path, db in pairs(cache) do
 		module:log("debug", "Closing db at %q", db_path);
+		gdbm.reorganize(db);
 		gdbm.sync(db);
 		gdbm.close(db);
 	end