mod_storage_sql: Skip cache write
authorKim Alvefur <zash@zash.se>
Fri, 22 Mar 2019 02:12:02 +0100
changeset 9895 147b28d001a0
parent 9894 b5ac12f97f34
child 9896 4803a25c7e36
mod_storage_sql: Skip cache write This would cause the cache to be wrong in case the the later INSERT fails and the transaction is aborted.
plugins/mod_storage_sql.lua
--- a/plugins/mod_storage_sql.lua	Fri Mar 22 02:10:46 2019 +0100
+++ b/plugins/mod_storage_sql.lua	Fri Mar 22 02:12:02 2019 +0100
@@ -282,7 +282,6 @@
 			local result, err = engine:delete(delete_sql, host, user or "", store, key);
 			if result then
 				item_count = item_count - result:affected();
-				archive_item_count_cache:set(cache_key, item_count);
 			end
 		else
 			key = uuid.generate();