Add: clear metadata cache when restoring backup

This commit is contained in:
Nicholas Wallace 2024-08-19 19:32:53 -07:00
parent ccdc3d60c4
commit 996c78d760

View File

@ -14,6 +14,7 @@ const fileUtils = require('../utils/fileUtils')
const { getFileSize } = require('../utils/fileUtils') const { getFileSize } = require('../utils/fileUtils')
const Backup = require('../objects/Backup') const Backup = require('../objects/Backup')
const CacheManager = require('./CacheManager')
class BackupManager { class BackupManager {
constructor(notificationManager) { constructor(notificationManager) {
@ -230,6 +231,9 @@ class BackupManager {
// Reset api cache, set hooks again // Reset api cache, set hooks again
await apiCacheManager.reset() await apiCacheManager.reset()
// Clear metadata cache
await CacheManager.purgeAll()
res.sendStatus(200) res.sendStatus(200)
// Triggers browser refresh for all clients // Triggers browser refresh for all clients