• Facebook
  • Twitter
  • Youtube
  • LinedIn
  • RSS
  • Docs
  • Comparisons
  • Blogs
  • Download
  • Contact Us
Download
Show / Hide Table of Contents

Add-BackingSource

This PowerShell cmdlet enables the user to configure backing source (Read-through and Write-through) providers for a specified cache. It configures backing source with batching and requeue options.

  • Windows PowerShell
  • Linux CLI
Add-BackingSource –AssemblyPath -CacheName –Class [-DependentAssemblyPath] -ProviderName [-BatchInterval] [-DefaultProvider] [-isBatching] [-NoDeploy] [-NoLogo] [-OperationDelay] [-OperationEvictionRatio] [-OperationPerSecond] [-OperationQueueLimit] [-Parameters] [-Port] [-ReadThru] [-Server] [-Credentials] [-WriteThru]

Examples

Important

Please note that either the ReadThru or WriteThru parameter must be specified when using this cmdlet.

  • This command configures Read-through provider for demoCache.
Add-BackingSource -CacheName demoCache -AssemblyPath C:\ReadThru.dll -Class ReadThru.Reader -ProviderName MyReader -ReadThru
  • This command configures Write-through provider for demoCache.
Add-BackingSource -CacheName demoCache -AssemblyPath C:\WriteThru.dll -Class WriteThru.Writer -ProviderName MyWriter -WriteThru
  • This command configures WriteThru provider with batching enabled, for demoCache that exists on server 20.200.20.11.
Add-BackingSource -CacheName demoCache -AssemblyPath C:\Provider.dll -Class WriteThrough.Writer -ProviderName MyWriter -WriteThru -Server 20.200.20.11 -isBatching
  • This command configures WriteThru provider with batching enabled, OperationDelay 10ms, BatchInterval 5s, OperationPerSecond 500, OperationQueueLimit 3000, OperationEvictionRatio 5% and Parameters which are key value pairs, _connectionString= “Server=localhost;Database=Northwind;Trusted_Connection=True;” and LoggerInfo=“Server=localhost;Database=TestLogger;Trusted_Connection=True;” for demoCache that exists on server 20.200.20.11.
Add-BackingSource -CacheName demoCache -AssemblyPath C:\Provider.dll -class WriteThrough.Writer -ProviderName MyWriter -WriteThru -Server 20.200.20.11 -isBatching -OperationDelay 10 -BatchInterval 5 -OperationPerSecond 500 -OperationQueueLimit 3000 -OperationEvictionRatio 5 -Parameters _connectionString="Server=localhost; Database=Northwind;Trusted_Connection=True;"'$'"LoggerInfo=Server=localhost;Database=TestLogger;Trusted_Connection=True;"

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 of the assembly which will be configured as a backing source. -
-CacheName* <String> Specifies the name of the cache for which backing source will be configured. -
-Class* <String> Specifies the fully qualified class from the backing source assembly which implements ReadThru/WriteThru. -
-DependentAssemblyPath <String> Specifies the dependent assembly folder/path. -
-ProviderName* <String> Specifies the provider name. -
-BatchInterval <Integer> Specifies periodic interval for operation expiration. 5
-DefaultProvider <SwitchParameter> Specifies the default provider in case of multiple providers. False
-isBatching <SwitchParameter> Specifies whether you want to enable batching or not. False
-NoDeploy <SwitchParameter> Specifies if no assembly should be deployed. False
-NoLogo <SwitchParameter> Suppresses the display of the logo banner. -
-OperationDelay <Integer> Specifies the time that cache suspends each operation write on data source. 0
-OperationEvictionRatio <Integer> Specifies the failed operations eviction ratio. 5
-OperationPerSecond <Integer> Specifies the rate at which cache writes the updates to the database. 1
-OperationQueueLimit <Integer> Specifies the maximum operation count to be re-queued in case of data source write operation failure. 5000
-Parameters <String> Specifies the list of the parameters passed to the backing source provider separated by ‘$’. -
-Port <Integer> Specifies the port on which NCache Service is running. 8250
-ReadThru* <SwitchParameter> Specifies if provided backing source is configured for ReadThru. False
-Server <String> Specifies a server name where the NCache Service is running and a cache with the specified cache-name is registered. Local Machine
-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. -
-WriteThru* <SwitchParameter> Specifies if provided backing source is configured for WriteThru. False
add-backingsource –assemblypath -cachename –class [-dependentassemblypath] -providername [-batchinterval] [-defaultprovider] [-isbatching] [-nodeploy] [-nologo] [-operationdelay] [-operationevictionratio] [-operationpersecond] [-operationqueuelimit] [-parameters] [-port] [-readthru] [-server] [-userid] [-password] [-writethru]

Examples

Important

Please note that either the readthru or writethru parameter must be specified when using this cmdlet.

  • This command configures ReadThru provider for demoCache.
add-backingsource -cachename demoCache -assemblypath /usr/ReadThru.dll -class ReadThru.Reader -providername MyReader -readthru
  • This command configures WriteThru provider for demoCache.
add-backingsource -cachename demoCache -assemblyPath /usr/WriteThru.dll -class WriteThru.Writer -providername MyWriter -writethru
  • This command configures WriteThru provider with batching enabled, for demoCache that exists on server 20.200.20.11.
add-backingsource -cachename demoCache -assemblypath /usr/Provider.dll -class WriteThru.Writer -providername MyWriter -writethru -server 20.200.20.11 -isbatching
  • This command configures WriteThru provider with batching enabled, OperationDelay 10ms, BatchInterval 5s, OperationPerSecond 500, OperationQueueLimit 3000, OperationEvictionRatio 5% and Parameters which are key value pairs, _connectionString= “Server=localhost;Database=Northwind;Trusted_Connection=True;” and LoggerInfo=“Server=localhost;Database=TestLogger;Trusted_Connection=True;” for demoCache that exists on server 20.200.20.11.
add-backingsource -cachename demoCache -assemblypath /usr/Provider.dll -class WriteThru.Writer -providername MyWriter -writethru -server 20.200.20.11 -isbatching -operationdelay 10 -batchinterval 5 -operationpersecond 500 -operationqueuelimit 3000 -operationevictionratio 5 -parameters _connectionString="Server=localhost; Database=Northwind;Trusted_Connection=True;"'$'"LoggerInfo=Server=localhost;Database=TestLogger;Trusted_Connection=True;"

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 of the assembly which will be configured as a backing source. -
-cachename* <String> Specifies the name of the cache for which backing source will be configured. -
-class* <String> Specifies the fully qualified class from the backing source assembly which implements ReadThru/WriteThru. -
-dependentassemblypath <String> Specifies the dependent assembly folder/path. -
-providername* <String> Specifies the provider name. -
-batchinterval <Integer> Specifies periodic interval for operation expiration. 5
-defaultprovider <SwitchParameter> Specifies the default provider in case of multiple providers. False
-isbatching <SwitchParameter> Specifies whether you want to enable batching or not. False
-nodeploy <SwitchParameter> Specifies if no assembly should be deployed. False
-nologo <SwitchParameter> Suppresses the display of the logo banner. -
-operationdelay <Integer> Specifies the time that cache suspends each operation write on data source. 0
-operationevictionratio <Integer> Specifies the failed operations eviction ratio. 5
-operationpersecond <Integer> Specifies the rate at which cache writes the updates to the database. 1
-operationqueuelimit <Integer> Specifies the maximum operation count to be re-queued in case of data source write operation failure. 5000
-parameters <String> Specifies the list of the parameters passed to the backing source provider separated by ‘$’. -
-port <Integer> Specifies the port on which NCache Service is running. 8250
-readthru <SwitchParameter> Specifies if provided backing source is configured for ReadThru. False
-server <String> Specifies a server name where the NCache Service is running and a cache with the specified cache-name is registered. Local Machine
-userid <String> Specifies the user-id used to authorize the user for this operation. It is required in case security is enabled on Cache Server. This user-id must be the active directory user-id. -
-password <String> Specifies the password of the user that is used to authorize the user for this operation. It is required in case security is enabled on Cache Server. This password must be the same as the active directory user password. -
-writethru <SwitchParameter> Specifies if provided backing source is configured for WriteThru. False

Contact Us

PHONE

+1 (214) 764-6933   (US)

+44 20 7993 8327   (UK)

 
EMAIL

sales@alachisoft.com

support@alachisoft.com

NCache
  • NCache Enterprise
  • NCache Community
  • Edition Comparison
  • NCache Architecture
  • Benchmarks
Download
Pricing
Try Playground

Deployments
  • Cloud (SaaS & Software)
  • On-Premises
  • Kubernetes
  • Docker
Technical Use Cases
  • ASP.NET Sessions
  • ASP.NET Core Sessions
  • Pub/Sub Messaging
  • Real-Time ASP.NET SignalR
  • Internet of Things (IoT)
  • NoSQL Database
  • Stream Processing
  • Microservices
Resources
  • Magazine Articles
  • Third-Party Articles
  • Articles
  • Videos
  • Whitepapers
  • Shows
  • Talks
  • Blogs
  • Docs
Customer Case Studies
  • Testimonials
  • Customers
Support
  • Schedule a Demo
  • Forum (Google Groups)
  • Tips
Company
  • Leadership
  • Partners
  • News
  • Events
  • Careers
Contact Us

  • EnglishChinese (Simplified)FrenchGermanItalianJapaneseKoreanPortugueseSpanish

  • Contact Us
  •  
  • Sitemap
  •  
  • Terms of Use
  •  
  • Privacy Policy
© Copyright Alachisoft 2002 - . All rights reserved. NCache is a registered trademark of Diyatech Corp.
Back to top