Add-StartupLoader
Note
This feature is only available in NCache Enterprise Edition.
Add-StartupLoader cmdlet enables the users to configure startup loader for the cache which loads the configured datasets from source to the cache whenever the cache will be started. It also allows the user to configure cache refresher that refreshes the loaded data after a specific time interval.
Add-StartupLoader [-CacheName] -AssemblyPath [-Class] [-DependentAssemblyPath] [-NoDeploy] [-NoLogo] [-Parameters] [-Password] [-Port] [-Retries] [-RetryInterval] [-RefreshInterval] [-PollForDatasetsToRefresh] [-Server] [-UserId]
These properties are explained in detail in the Properties section.
Examples
- This command configures startup loader for a cache named demoCache. The assemblies to be deployed are placed at the specified path and the default port 8250.
Add-StartupLoader –CacheName demoCache –AssemblyPath C:\Loader.dll -Class StartupLoader.Loader
- This command configures startup loader for a cache named demoCache. The assemblies to be deployed are placed at the specified path on server node 20.200.20.11.
Add-StartupLoader -CacheName demoCache –AssemblyPath C:\Loader.dll -Class StartupLoader.Loader –Server 20.200.20.11
- This command configures cache refresher for demoCache on server 20.200.20.11 with refresh interval set to 20 minutes.
Add-StartupLoader -CacheName demoCache -AssemblyPath C:\Loader.dll -Class StartupLoader.Loader -Server 20.200.20.11 - RefreshInterval 20
- This command configure cache refresher for demoCache on server 20.200.20.11 with poll-based refreshing enabled.
Add-StartupLoader -CacheName demoCache -AssemblyPath C:\Loader.dll -Class StartupLoader.Loader -Server 20.200.20.11 -PollForDatasetsToRefresh
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. | - |
-Class |
<String> |
Specifies the fully qualified class from the startup loader which implements ICacheLoader/ICache Startup Provider. | - |
-Parameters |
<String> |
Specifies the list of the parameters which are to be passed to the cache loader separated by ‘$’ e.g key1=value1 ‘$’ key2=value2. | - |
-Server |
<String> |
Specifies the NCache server name/IP on which NCache service is running. | - |
-Port |
<Integer> |
Specifies the server port where NCache server is listening. | 8250 |
-Retries |
<Integer> |
In case of failed operations; specifies the number of retries for loading data in the cache. | - |
-RetryInterval |
<Integer> |
Specifies the interval to wait before each retry. | 0(zero) |
-RefreshInterval |
<Integer> |
Specifies the refresh interval after which the cache polls to observe new datasets that needs to be refreshed from datasource. | 15 minutes |
-PollForDatasetsToRefresh |
<SwitchParameter> |
Refresh datasets in real time by calling GetDatasetsToRefresh method from the configured cache loader assembly. | |
-NoDeploy |
<SwitchParameter> |
Specified if no assembly should be deployed. | False |
-DependentAssemblyPath |
<String> |
Specifies the path where dependent assemblies or folders are placed. | - |
-UserID |
<String> |
Specifies the User Id used to authorize a user if security is enabled on cache server. This User Id must be the same as the active directory user credentials. | - |
-Password (Enterprise edition only) |
<String> |
Specifies the password against the user Id; to authorize a user if security is enabled on cache server. This password must be the same as active directory password. | - |
-NoLogo |
<SwitchParameter> |
Suppresses display of the logo banner. | False |