Configuring Read-Through Provider
Read-Through provider can be configured in following ways:
Using NCache Manager
Click on the cache name in Cache Explorer to open the cache settings.
Go to Backing Source tab.
Check Enable Read-Through check box to enable it. After enabling it, other options will get enabled as well.
Click Add to select assembly that has
A new dialog box Add New Provider will open.
Enter Provider Name and click on ‘…’ button to browse for assembly implementing
Browse for the required assembly and select Open.
Name of selected assembly will be appeared in Assembly Name and its classes implementing interface will be listed down in Class Name list box.
Select the required Read-Through provider. You can also provide the values to your read-through provider class, if required. Just write the parameter name in Parameter field and its value against it under the Value field.
These parameters, along with their assigned values, are passed to the selected Read-Through provider when it is initialized on cache start. Providing the parameters is optional.
Selected provider class will be listed in Read-Through provider list at Backing Source tab.
You can configure multiple Read-Through providers for a cache.
Now deploy the read-through provider assembly along with its dependency assemblies, if any. Click on the Deploy Provider button at the left bottom of the Backing Source tab.
Browse for required assemblies.
Select all the required assemblies and click Open.
Apply the configurations by right clicking on cache name in Cache Explorer and selecting Apply Configuration option.
Using Command Line Tool
Open Command Prompt.
Go to the NCache tools directory: cd [InstallDir]/bin/tools
addbackingsource.exe, provide the required information as:
addbackingsource.exe demoLocalCache /path C:\Providers\Providers.dll /c NCache.Sample.Providers.Readers.Reader1 /pn reader1 /R
This will configure Reader1 read-through provider on demoLocalCache.
Now deploy all of the required assemblies (assembly in which you have implemented the read-through provider and all of its dependency assemblies) using
deployprovider.exe. Use following command on Command Prompt:
deployprovider demoLocalCache /T C:\Providers\
- This will deploy all of the assemblies from the given path to NCache deploy folder.
All deployed assemblies for a given cache reside on the following path: