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

Configuring Write-through Provider

To preserve the cache data in some persistent storage, you can configure Write-through providers for a cache. By using the Write-through provider, the cached data and data added/updated/removed are synchronized with a data source.

Important

For .NET, before deploying your .dll files, ensure you have the appropriate .NET Version installed as discussed in the NCache Installation Guide.

Using the NCache Management Center

  • Launch the NCache Management Center by browsing to http://localhost:8251 or <server-ip>:8251 on Windows and Linux.

  • In the left navigation bar, click on Clustered Caches or Local Caches, based on the cache to which the backing source will be configured. Against the cache name, click on View Details.

  • Make sure that the cache is stopped.

Configure Read Through Web

  • This opens up the detailed configuration page for the cache. Go to the Advanced Settings tab and click on Backing Source in the left bar.

  • Check the Enable Write Through box. Click on Add Provider.

Configure Read Through Web

  • A new page Add Write Thru Provider opens up. Enter the Provider Name in the text box and then click on the Browse button to browse for assembly implementing the IWriteThruProvider interface. Select the class name from the drop-down list.

  • Select the required Write-through provider.

Configure Write-through Provider Name

  • You can also provide the values to your Write-through provider class, if required. Specify the parameter name in the Parameter field and its value under the Value field.
Note

These parameters, along with their assigned values, are passed to the selected Write-through provider when it is initialized on cache start. Providing the parameters is optional.

  • Click OK.

  • The selected provider class will be listed in the Write Through provider list in the Backing Source tab.

Write-through Providers List

  • Deploy the Write-through provider assembly along with its dependent assemblies if any. Click on the Deploy Backing Source Provider button at the bottom left of the Backing Source tab page. Browse for the required assemblies, select all of the required assemblies, and click Open.

Write-through Providers List

  • After applying all the changes click on Save Changes.

Using Command Line Tools

You can also use the Command Line Tools to configure Write-through, as discussed below.

Configure Write-through

The Add BackingSource cmdlet enables users to configure backing source (Write-through) providers for the specified cache This command configures Writer1 as the Write-through provider on demoCache.

  • Windows
  • Linux
Add-BackingSource -CacheName demoCache -AssemblyPath C:\WriteThru.dll -Class WriteThru.Writer -ProviderName MyWriter -WriteThru
add-backingsource -cachename demoCache -assemblyPath /usr/WriteThru.dll -class WriteThru.Writer -providername MyWriter -writethru

Remove Write-through

The Remove BackingSource cmdlet removes the pre-configured backing source providers (Write-through) from the cache or a specified server. The following command removes the pre-configured Write-through provider named Writer1 from the demoCache existing on server 20.200.20.39.

  • Windows
  • Linux
Remove-BackingSource -CacheName demoCache -ProviderName Writer1 –WriteThru –Server 20.200.20.39
remove-backingsource -cachename demoCache -providername Writer1 –writethru –server 20.200.20.39

See Also

Read-through Provider
Write-through Provider for Write-Behind Operations
Deploy Providers
Add Test Data

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