-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4738aa8
commit 40aecbd
Showing
15 changed files
with
43 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ cache/* | |
*.log | ||
|
||
!cache/README.md | ||
!cache/framework_cache.psm1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<# | ||
### Note ### | ||
This file is shipping plain with Icinga for Windows for each version. | ||
Once the module is loaded, this content will entirely be replaced with | ||
all modules and components shipped by the Icinga PowerShell Framework. | ||
Manually enabling the feature is no longer required. | ||
#> | ||
|
||
$Global:Icinga = @{ | ||
'RebuildCache' = $TRUE; | ||
}; | ||
|
||
Write-IcingaFrameworkCodeCache; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,21 @@ | ||
# Enable Framework Code Caching | ||
# Framework Code Caching | ||
|
||
On certain systems with fewer CPU cores, there might be an impact while running Icinga for Windows because of long loading times for the Icinga PowerShell Framework. To mitigate this issue, we added the possibility to create a code cache file for the entire Icinga PowerShell Framework. | ||
By default, Icinga for Windows will compile all module files into a single cache file for quicker and easier loading. This ensures, that during startup all functions are available and can be used in combination with JEA profiles. | ||
|
||
What it does is to load every single module and content file into one single `cache.psm1` file which is loaded in case the caching is enabled. | ||
The location of the cache file is at | ||
|
||
## Pre-Cautions | ||
|
||
By enabling this feature, you will have to generate a new cache file whenever you apply changes to any code for the Icinga PowerShell Framework. This can be done by running the Cmdlet | ||
|
||
```powershell | ||
Write-IcingaFrameworkCodeCache | ||
``` | ||
|
||
Please note that the code cache feature must be enabled first. | ||
|
||
In case you upgrade to a newer version of the Icinga PowerShell Framework, you will only require to manually proceed in case the code cache feature was disabled beforehand. In case the code cache feature is enabled during the upgrade, the cache file will be generated and updated automatically. | ||
|
||
## Enable Icinga Framework Code Cache | ||
|
||
To enable the Icinga PowerShell Framework code cache, simply run the following command within an Icinga Shell: | ||
|
||
```powershell | ||
Enable-IcingaFrameworkCodeCache | ||
.\cache\framework_cache.psm1 | ||
``` | ||
|
||
Once activated, you should make sure to generate a new cache file before using the Framework: | ||
|
||
```powershell | ||
Write-IcingaFrameworkCodeCache | ||
``` | ||
|
||
If you leave the code caching feature enabled, future updates of the Framework will automatically generate a new cache file. If you disabled the feature in-between, please write the cache file manually. | ||
## Pre-Cautions | ||
|
||
In case no cache file is present while the feature is activated, a cache file is generated on the first use of `Use-Icinga` or `icinga`. | ||
In case you are running custom modifications to the Framework or apply manual patches, you will **always** have to re-write the Icinga for Windows cache file! During upgrades by using the Icinga for Windows Cmdlets, the cache file is updated automatically. | ||
|
||
## Disable Icinga Framework Code Cache | ||
## Updating Cache File | ||
|
||
To disable the code caching feature again, you can simply run | ||
To re-write the cache file and update it to the latest version manually, you can use the following command: | ||
|
||
```powershell | ||
Disable-IcingaFrameworkCodeCache | ||
Write-IcingaFrameworkCodeCache | ||
``` | ||
|
||
Please note that even though the cache file is no longer loaded it still remains. Therefor you will have to manually use `Write-IcingaFrameworkCodeCache` in case you activate the feature later again. This is especially required if you update the Icinga PowerShell Framework while the feature was disabled. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 0 additions & 32 deletions
32
lib/core/installer/menu/installation/framework/EnableCodeCache.psm1
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
lib/core/installer/menu/manage/framework/ToogleFrameworkCodeCache.psm1
This file was deleted.
Oops, something went wrong.