mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-20 19:06:06 +01:00
Add: clear metadata cache when restoring backup
This commit is contained in:
parent
ccdc3d60c4
commit
996c78d760
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user