From 996c78d760b25574711930cada06bf2b20b75f2d Mon Sep 17 00:00:00 2001 From: Nicholas Wallace Date: Mon, 19 Aug 2024 19:32:53 -0700 Subject: [PATCH] Add: clear metadata cache when restoring backup --- server/managers/BackupManager.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/managers/BackupManager.js b/server/managers/BackupManager.js index 71b8304c..54727b6b 100644 --- a/server/managers/BackupManager.js +++ b/server/managers/BackupManager.js @@ -14,6 +14,7 @@ const fileUtils = require('../utils/fileUtils') const { getFileSize } = require('../utils/fileUtils') const Backup = require('../objects/Backup') +const CacheManager = require('./CacheManager') class BackupManager { constructor(notificationManager) { @@ -230,6 +231,9 @@ class BackupManager { // Reset api cache, set hooks again await apiCacheManager.reset() + // Clear metadata cache + await CacheManager.purgeAll() + res.sendStatus(200) // Triggers browser refresh for all clients