aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/mod_storage_sql.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua
index f034a0eb..deafb005 100644
--- a/plugins/mod_storage_sql.lua
+++ b/plugins/mod_storage_sql.lua
@@ -624,8 +624,12 @@ function archive_store:delete(username, query)
end
return engine:delete(sql_query, unpack(args));
end);
- local cache_key = jid_join(username, host, self.store);
- archive_item_count_cache:set(cache_key, nil);
+ if username == true then
+ archive_item_count_cache:clear();
+ else
+ local cache_key = jid_join(username, host, self.store);
+ archive_item_count_cache:set(cache_key, nil);
+ end
return ok and stmt:affected(), stmt;
end