Skip to content

Commit 7dfa227

Browse files
committed
Adds rebuild cache switch to icinga cmd
1 parent 5f86b2d commit 7dfa227

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

doc/31-Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
2525
* [#316](https://github.com/Icinga/icinga-powershell-framework/pull/316) The reconfigure menu was previously present inside the Icinga Agent sub-menu and is now moved to the main installation menu for the Management Console
2626
* [#318](https://github.com/Icinga/icinga-powershell-framework/pull/318) We always enforce the Icinga Framework Code caching now and ship a plain file to build the cache on first loading
2727
* [#322](https://github.com/Icinga/icinga-powershell-framework/pull/322) Remove legacy import feature from Framework and replace it with a dummy function, as no longer required by Icinga for Windows
28+
* [#323](https://github.com/Icinga/icinga-powershell-framework/pull/323) Adds `-RebuildCache` switch to `icinga` command alias and `Invoke-IcingaCommand`, for quicker cache re-creation for developers
2829

2930
## 1.5.2 (2021-07-09)
3031

icinga-powershell-framework.psm1

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,10 @@ function Invoke-IcingaCommand()
203203
[CmdletBinding()]
204204
param (
205205
$ScriptBlock,
206-
[switch]$SkipHeader = $FALSE,
207-
[switch]$Manage = $FALSE,
208-
[array]$ArgumentList = @()
206+
[switch]$SkipHeader = $FALSE,
207+
[switch]$Manage = $FALSE,
208+
[switch]$RebuildCache = $FALSE,
209+
[array]$ArgumentList = @()
209210
);
210211

211212
Import-LocalizedData `
@@ -229,6 +230,10 @@ function Invoke-IcingaCommand()
229230
Write-IcingaConsoleHeader -HeaderLines $Headers;
230231
}
231232

233+
if ($RebuildCache) {
234+
Write-IcingaFrameworkCodeCache;
235+
}
236+
232237
powershell.exe -NoExit -Command {
233238
$Script = $args[0];
234239
$RootPath = $args[1];

0 commit comments

Comments
 (0)