source: binary-improvements2/WebServer/src/FileCache/InvalidateCachesCmd.cs@ 430

Last change on this file since 430 was 405, checked in by alloc, 21 months ago

Refactored console commands for A21 caching

File size: 690 bytes
Line 
1using System.Collections.Generic;
2using JetBrains.Annotations;
3
4namespace Webserver.FileCache {
5 [UsedImplicitly]
6 public class InvalidateCachesCmd : ConsoleCmdAbstract {
7 protected override string[] getCommands () {
8 return new[] {"invalidatecaches"};
9 }
10
11 protected override string getDescription () {
12 return "Invalidate contents of web file caches";
13 }
14
15 protected override string getHelp () {
16 return "TODO";
17 }
18
19 public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) {
20 (int files, int bytes) = AbstractCache.InvalidateAllCaches ();
21 SdtdConsole.Instance.Output ($"Caches invalidated, dropped {files} files with {bytes} Bytes");
22 }
23
24 }
25}
Note: See TracBrowser for help on using the repository browser.