• Products
  • Solutions
  • Customers
  • Resources
  • Company
  • Pricing
  • Download
Try Playground
  • DataSource Providers
  • Add-BackingSource
Show / Hide Table of Contents
  • Command-Line Interface
  • Cmdlets in Different Editions
  • PowerShell on Windows
    • Setting Up PowerShell Environment
    • Install PowerShell without NCache Installation
  • Install-NCacheModule
  • Client Management
    • Add-ClientNode
    • Remove-ClientNode
    • Add-ClientNodeSecurity
  • Cache Management
    • New-Cache
    • Start-Cache
    • Stop-Cache
    • Set-CacheConfiguration
    • Export-CacheData
    • Export-CacheKeys
    • Export-CacheConfiguration
    • Get-CacheCount
    • Clear-Cache
    • Remove-Cache
    • Set-NCServiceConfigSetting
  • Client Cache
    • New-ClientCache
    • Add-ClientCacheRefDatatype
    • Remove-ClientCacheRefDatatype
    • Remove-ClientCache
  • Node Management
    • Add-Node
    • Remove-Node
  • Query Index
    • Add-QueryIndex
    • Remove-QueryIndex
  • Loader & Refresher
    • Add-LoaderDataSet
    • Invoke-RefresherDataset
    • Remove-LoaderDataSet
    • Add-StartupLoader
    • Remove-StartupLoader
  • DataSource Providers
    • Add-BackingSource
    • Remove-BackingSource
  • Custom Dependency
    • Add-CustomDependency
    • Remove-CustomDependency
  • Pub/Sub Messaging
    • Get-Topics
  • Bridge
    • New-Bridge
    • Add-BridgeNode
    • Add-BridgeCache
    • Start-Bridge
    • Set-BridgeCacheMode
    • Start-BridgeStateTransfer
    • Stop-Bridge
    • Remove-Bridge
    • Remove-BridgeCache
    • Remove-BridgeNode
  • Mapreduce
    • Add-MapReduce
  • Compact Serilaization
    • Add-CompactType
    • Add-PortableType
    • Remove-PortableType
    • Remove-CompactType
  • Security
    • Enable-NCacheSecurity
    • Add-NCacheUserOrGroup
    • Remove-NCacheUserOrGroup
    • Enable-NCacheTLS
    • Disable-NCacheTLS
    • Disable-NCacheSecurity
    • Enable-NCEncryption
    • Disable-NCEncryption
  • Data Persistence
    • Suspend-NCacheDataPersistence
    • Resume-NCacheDataPersistence
  • Monitoring
    • Get-Caches
    • Get-CacheLogs
    • Get-CacheLogsList
    • Get-ConnectedClients
    • Get-CacheClientStatistics
    • Get-CacheServerStatistics
    • Add-TestData
    • Test-Stress
    • Get-ClusterHealth
    • New-MemoryDump
    • Get-MemoryDumpList
    • Send-MemoryDump
    • Remove-MemoryDump
    • Measure-CachePerformance
    • Invoke-ServerLogger
    • Import-CacheData
  • Management Center
    • Start-NCacheManagementCenter
    • Stop-NCacheManagementCenter
    • Set-CacheServerPublicIP
  • NCache Playground
    • Start-NCachePlaygroundProcess
    • Stop-NCachePlaygroundProcess
  • NCache Registration
    • Register-NCache
    • Register-NCacheEvaluation
    • Unregister-NCache
    • Get-NCacheVersion

Add-BackingSource - PowerShell Cmdlet

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.

Note

This feature is only available in NCache Enterprise.

Note

Please note that when using the NCache .NET Edition, you will require .dll libraries instead of .jar assemblies for this PowerShell Cmdlet.

  • Windows PowerShell
  • Linux CLI
Important

Make sure that the cache has been stopped before proceeding to execute this PowerShell Cmdlett.

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

Examples of Add-BackingSource - PowerShell Cmdlet

  • The following command configures ReadThru provider for demoCache.
Add-BackingSource -CacheName demoCache -AssemblyPath C:\ReadThru.jar -Class ReadThru.Reader -ProviderName MyReader -ReadThru
  • The following command configures WriteThru provider for demoCache.
Add-BackingSource -CacheName demoCache -AssemblyPath C:\WriteThru.jar -Class WriteThru.Writer -ProviderName MyWriter -WriteThru
  • The following command configure ReadThru Java provider for demoCache.
Add-BackingSource -CacheName demoCache -AssemblyPath C:\BackingSourceProvider-1.0.jar -Class ReadThru.Reader -ProviderName MyReader -ReadThru
  • The following command configure WriteThru Java provider for demoCache.
Add-BackingSource -CacheName demoCache -AssemblyPath C:\BackingSourceProvider-1.0.jar -Class WriteThru.Writer -ProviderName MyWriter -WriteThru
  • The following command configures WriteThru provider with batching enabled, for demoCache that exists on server 20.200.20.11.
Add-BackingSource -CacheName demoCache -AssemblyPath C:\Provider.jar -Class WriteThrough.Writer -ProviderName MyWriter -WriteThru -Server 20.200.20.11 -isBatching
  • The following 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.jar -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), e.g.,"key1=value1$key2=value2$..." -
-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. IP of local machine
-Credentials <pscredential> Specifies the user credentials required to authorize access for the specified operation. These credentials should belong to a user who has appropriate permissions at the node. -
-WriteThru* <SwitchParameter> Specifies if provided backing source is configured for WriteThru. False
Important

Make sure that the cache has been stopped before proceeding to execute this cmdlet.

add-backingsource –assemblypath [-cachename] [–class] -dependentassemblypath -providername [-batchinterval] [-defaultprovider] [-isbatching] [-nodeploy] [-nologo] [-operationdelay] [-operationevictionratio] [-operationpersecond] [-operationqueuelimit] [-parameters] [-port] [-readthru] [-server] [-userid] [-password] [-writethru]

Examples of Add-BackingSource

  • The following command configures ReadThru provider for demoCache.
add-backingsource -cachename demoCache -assemblypath /usr/ReadThru.jar -class ReadThru.Reader -providername myreader -readthru
  • The following command configures WriteThru provider for demoCache.
add-backingsource -cachename demoCache -assemblyPath /usr/WriteThru.jar -class WriteThru.Writer -providername mywriter -writethru
  • The following command configure ReadThru Java provider for demoCache.
add-backingsource -cachename demoCache -assemblypath /usr/BackingSourceProvider-1.0.jar -class ReadThru.reader -providername myreader -readthru
  • The following command configure WriteThru Java provider for demoCache.
add-backingsource -cachename demoCache -assemblypath /usr/BackingSourceProvider-1.0.jar -class WriteThru.Writer -providername mywriter -writethru
  • The following command configures WriteThru provider with batching enabled, for demoCache that exists on server 20.200.20.11.
add-backingsource -cachename demoCache -assemblypath /usr/Provider.jar -class WriteThru.Writer -providername mywriter -writethru -server 20.200.20.11 -isbatching
  • The following 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.jar -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), e.g.,"key1=value1$key2=value2$..." -
-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. IP of 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
In This Article
  • Examples of Add-BackingSource - PowerShell Cmdlet
  • Properties
  • Examples of Add-BackingSource
  • Properties

Contact Us

PHONE

+1 (214) 764-6933   (US)

+44 20 7993 8327   (UK)

 
EMAIL

sales@alachisoft.com

support@alachisoft.com

NCache
  • NCache Enterprise
  • NCache Professional
  • 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 - 2025. All rights reserved. NCache is a registered trademark of Diyatech Corp.
Back to top