Try Playground
Show / Hide Table of Contents

Read-through Caching

NCache uses your custom Read-through provider to communicate with the data source. In Read-through Caching, NCache will call your provider to load data behind the get call, in case of a cache miss. In clustered caches, where multiple servers are involved, the Read-through provider will be active (initialized) on all cache server nodes, but Read-through operations will only be performed by the node that receives the get operation according to the topology being used.

Note

This feature is only available in NCache Enterprise.

Just like Read-through caching, NCache also provides the option of forced Read-through through which the data is fetched from the data source forcefully, regardless of whether the data is present in the cache or not. This means that data will not be checked in the cache and will be fetched directly from the data source.

Note

NCache provides a performance counter Read-thru/sec for Read-through operations.

The Resync mechanism in NCache keeps the data up to date across the cache. There may be a scenario where the user wants to keep the data synced with the data source. In this case, the data will be synced with the data source whenever an item with resync enabled expires. This way the data in the cache remains fresh and operations are performed on updated data. The NCache Read-through provider can be used as a resync provider by specifying ResyncOptions while adding a cache item into the cache. ResyncOptions takes a flag that indicates whether to resync an item on expiration or not. It takes the Read-through provider name as a parameter.

Note

The default Read-through caching provider will be used if the provider name is not specified.

Warning

Do not make calls to the same cache for which Read-through is configured in the provider code. This can cause recursion and can halt the normal working of the cache.

Note

Read-Through is [Deprecated] for NCache Java.

In This Section

Configure Read-Thru Provider
Explains the IReadThruProvider interface and provides a sample implementation for the interface.

Read-Thru with Cache Operations
Provides samples to use Read-through with basic and bulk operations in NCache.

In This Article
  • In This Section

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