mod_storage_gdbm/mod_storage_gdbm.lua
changeset 1760 c619425dafe7
parent 1758 c04d10557bbc
child 1764 e72f9eac51c8
equal deleted inserted replaced
1759:0a21b16b9075 1760:c619425dafe7
   168 end
   168 end
   169 
   169 
   170 function module.unload()
   170 function module.unload()
   171 	for db_path, db in pairs(cache) do
   171 	for db_path, db in pairs(cache) do
   172 		module:log("debug", "Closing db at %q", db_path);
   172 		module:log("debug", "Closing db at %q", db_path);
       
   173 		gdbm.reorganize(db);
   173 		gdbm.sync(db);
   174 		gdbm.sync(db);
   174 		gdbm.close(db);
   175 		gdbm.close(db);
   175 	end
   176 	end
   176 end
   177 end
   177 
   178