aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/plugins/plugin-manager.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-03-17 09:09:06 +0100
committerChocobozzz <me@florianbigard.com>2022-03-17 09:09:06 +0100
commit2769876fb26742f5cc8aa4b761be7bafca97d18d (patch)
tree250988e78313840b15f925a40d20c7109adb4ab5 /server/lib/plugins/plugin-manager.ts
parent52fe4b671a20c37ae46cf88d175dd16cddfc4de7 (diff)
downloadPeerTube-2769876fb26742f5cc8aa4b761be7bafca97d18d.tar.gz
PeerTube-2769876fb26742f5cc8aa4b761be7bafca97d18d.tar.zst
PeerTube-2769876fb26742f5cc8aa4b761be7bafca97d18d.zip
Fix client html cache on theme update
Diffstat (limited to 'server/lib/plugins/plugin-manager.ts')
-rw-r--r--server/lib/plugins/plugin-manager.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/lib/plugins/plugin-manager.ts b/server/lib/plugins/plugin-manager.ts
index 39e7f9a5b..1305f660f 100644
--- a/server/lib/plugins/plugin-manager.ts
+++ b/server/lib/plugins/plugin-manager.ts
@@ -277,6 +277,8 @@ export class PluginManager implements ServerHook {
277 logger.info('Regenerating registered plugin CSS to global file.') 277 logger.info('Regenerating registered plugin CSS to global file.')
278 await this.regeneratePluginGlobalCSS() 278 await this.regeneratePluginGlobalCSS()
279 } 279 }
280
281 ClientHtml.invalidCache()
280 } 282 }
281 283
282 // ###################### Installation ###################### 284 // ###################### Installation ######################
@@ -419,6 +421,8 @@ export class PluginManager implements ServerHook {
419 } 421 }
420 422
421 await this.addTranslations(plugin, npmName, packageJSON.translations) 423 await this.addTranslations(plugin, npmName, packageJSON.translations)
424
425 ClientHtml.invalidCache()
422 } 426 }
423 427
424 private async registerPlugin (plugin: PluginModel, pluginPath: string, packageJSON: PluginPackageJSON) { 428 private async registerPlugin (plugin: PluginModel, pluginPath: string, packageJSON: PluginPackageJSON) {
@@ -473,8 +477,6 @@ export class PluginManager implements ServerHook {
473 // ###################### CSS ###################### 477 // ###################### CSS ######################
474 478
475 private resetCSSGlobalFile () { 479 private resetCSSGlobalFile () {
476 ClientHtml.invalidCache()
477
478 return outputFile(PLUGIN_GLOBAL_CSS_PATH, '') 480 return outputFile(PLUGIN_GLOBAL_CSS_PATH, '')
479 } 481 }
480 482
@@ -482,8 +484,6 @@ export class PluginManager implements ServerHook {
482 for (const cssPath of cssRelativePaths) { 484 for (const cssPath of cssRelativePaths) {
483 await this.concatFiles(join(pluginPath, cssPath), PLUGIN_GLOBAL_CSS_PATH) 485 await this.concatFiles(join(pluginPath, cssPath), PLUGIN_GLOBAL_CSS_PATH)
484 } 486 }
485
486 ClientHtml.invalidCache()
487 } 487 }
488 488
489 private concatFiles (input: string, output: string) { 489 private concatFiles (input: string, output: string) {