Add-StartupLoader
The Add-StartupLoader PowerShell cmdlet enables the users to configure Startup Cache Loader for the cache which populates the cache with critical datasets at startup. It also allows the user to configure Cache Refresher that refreshes the preloaded data after a specified time interval.
Warning
Make sure that the cache has been stopped before proceeding to execute this cmdlet.
Add-StartupLoader -AssemblyPath -CacheName `
-Class [-Parameters] `
[-Server] [-Port] `
[-Retries] [-RetryInterval] `
[-RefreshInterval] [-PollForDatasetsToRefresh] `
[-NoDeploy] [-DependentAssemblyPath] `
[-NoLogo] [-Credentials]
Examples
- This command configures a Startup Cache Loader for a cache named defaultCache. The assemblies to be deployed are placed at the specified path and the default port 9800.
Add-StartupLoader -CacheName defaultCache -AssemblyPath C:\Loader.dll `
-Class StartupLoader.Loader
- This command configures a Startup Cache Loader for a cache named defaultCache. The assemblies to be deployed are placed at the specified path and the default port 9800. The
-NoDeployparameter specifies that no assembly should be deployed.
Add-StartupLoader -CacheName defaultCache -AssemblyPath C:\Loader.dll `
-Class StartupLoader.Loader -NoDeploy
- This command configures a Startup Loader for a cache named defaultCache on the server node 20.200.20.11.
Add-StartupLoader -CacheName defaultCache -AssemblyPath C:\Loader.dll `
-Class StartupLoader.Loader -Server 20.200.20.11 `
- This command configures a Startup Loader for a cache named defaultCache on the server node 20.200.20.11 and specifies a directory for all required secondary libraries.
Add-StartupLoader -CacheName defaultCache -AssemblyPath C:\Loader.dll `
-Class StartupLoader.Loader -Server 20.200.20.11 `
-DependentAssemblyPath C:\Dependencies\
- This command configures a Cache Loader for defaultCache on server 20.200.20.11 with a refresh interval set to 1200 seconds. Retry Interval has been set to 0, meaning the loader will not wait between any failed operation retry attempts.
Add-StartupLoader -CacheName defaultCache -AssemblyPath C:\Loader.dll `
-Class StartupLoader.Loader -Server 20.200.20.11 `
-RefreshInterval 1200 -RetryInterval 0
- This command configures a Cache Loader for defaultCache on server 20.200.20.11 and additionally polls for datasets to refresh at every refresh interval.
Add-StartupLoader -CacheName defaultCache -AssemblyPath C:\Loader.dll `
-Class StartupLoader.Loader -Server 20.200.20.11 `
-PollForDatasetsToRefresh
- This command configures a Startup Cache Loader for a cache named defaultCache, using security credentials.
Add-StartupLoader -CacheName defaultCache -AssemblyPath C:\Loader.dll `
-Class StartupLoader.Loader -Credentials(Get-Credential john_smith)
Properties
Note
The parameters with asterisk (*) on their names are the required parameters and the rest are optional.
| Parameters | Data Types | Description | Default Value |
|---|---|---|---|
-AssemblyPath* |
<String> |
Specifies the path where the assembly is placed which is to be configured as a Startup Loader/Refresher. | - |
-CacheName* |
<String> |
Specifies the name of the cache for which Cache Loader is to be configured. NOTE: The cache must already exist on the source server. |
- |
-Class* |
<String> |
Specifies the fully qualified class name from the Startup Loader which implements ICacheLoader. |
- |
-Parameters |
<String> |
Specifies the list of the parameters which are to be passed to the Cache Loader separated by ‘$’. | - |
-Server |
<String> |
Specifies a server name where the NCache Service is running and a cache with the specified cache-name is registered. | IP of local machine |
-Port |
<Integer> |
Specifies the server port where the NCache Service is listening. | 9800 |
-Retries |
<Integer> |
Specifies the number of retries for loading data in the cache in case of failed operations. | - |
-RetryInterval |
<Integer> |
Specifies the interval to wait before each failed operation retry. | 0 |
-RefreshInterval |
<Integer> |
Specifies the refresh interval after which the cache polls to observe new datasets that needs to be refreshed from datasource. | 900 seconds |
-PollForDatasetsToRefresh |
<SwitchParameter> |
Refresh datasets in real time by calling GetDatasetsToRefresh method from the configured Cache Loader assembly. |
|
-NoDeploy |
<SwitchParameter> |
Specifies if no assembly should be deployed. | False |
-DependentAssemblyPath |
<String> |
Specifies the path where dependent assemblies or folders are placed. | - |
-Credentials |
<pscredential> |
Specifies the user credentials required to authorize access for the specified operation. These credentials should belong to a user with the appropriate permissions at the node. | - |
-NoLogo |
<SwitchParameter> |
Suppresses display of the logo banner. | False |