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

Types of Caches

NCache supports different cache types for different application and deployment requirements. Each cache type defines where cached data is stored, how it is accessed, and whether it is shared, synchronized, or distributed across multiple servers.

A Local Cache stores data on a single server and is suitable for application-specific or single-node caching scenarios. A Client Cache works as a local synchronized layer in front of a clustered cache and helps improve read performance. A Distributed Cache spans multiple cache servers and is used when applications require scalability, high availability, and fault tolerance. A Pub/Sub Messaging Cache enables applications to exchange messages through topics in an event-driven architecture.

This page explains the cache types supported by NCache and when each type is typically used.

  • Local Cache
  • Client Cache
  • Distributed Cache
  • Pub/Sub Messaging Cache

Local Cache

A Local Cache is a standalone cache that runs on a single server. It stores data locally and is not shared with other cache servers or applications running on other nodes.

A Local Cache can be configured as InProc or OutProc. InProc cache runs inside the application process, while OutProc cache runs as a separate process on the same server. Since the data is stored locally, this cache type provides fast access and avoids network calls.

However, a Local Cache does not provide clustering, replication, or failover. Therefore, it is suitable for scenarios where cached data is required only by a single application or server.

Local Cache can be used for:

  • Single-server applications.
  • Temporary or application-specific data.
  • Development and testing environments.
  • Scenarios where high availability and data replication are not required.

Client Cache

A Client Cache is a local cache that resides on the application server and works with a clustered cache. It keeps frequently used data closer to the application so that repeated read requests can be served locally.

Client Cache is useful when applications frequently read the same data from a distributed cache. Instead of sending every request to the cache cluster, the application can retrieve data from the Client Cache when it is available locally.

The Client Cache remains synchronized with the clustered cache. When data changes in the clustered cache, NCache updates or invalidates the corresponding data in the Client Cache according to the configured synchronization behavior.

Client Cache can be used for:

  • Read-intensive applications.
  • Applications where frequently accessed data should be available locally.
  • Reducing network calls between application servers and the cache cluster.
  • Improving response time while still using a distributed cache as the main data store.

Distributed Cache

A Distributed Cache is a clustered cache that runs across multiple cache servers. It provides a single logical cache to applications, while the cached data is distributed across the servers in the cluster.

Distributed Cache is suitable for production environments where applications need scalability, high availability, and fault tolerance. As application load increases, more server nodes can be added to the cache cluster to increase capacity and throughput.

NCache supports different clustered caching topologies, such as Partitioned, Partition-Replica, and Replicated. The topology determines how data is distributed, replicated, and made available if a server node leaves the cluster or becomes unavailable.

Distributed Cache can be used for:

  • High-traffic applications.
  • Multi-server application deployments.
  • Scenarios that require scalable cache storage.
  • Applications that require data availability and failover support.
  • Production environments where cache load must be distributed across multiple servers.

Pub/Sub Messaging Cache

A Pub/Sub Messaging Cache allows applications to communicate through a publisher/subscriber messaging model. In this model, publishers send messages to topics, and subscribers receive messages from the topics they are subscribed to.

This cache type is useful for event-driven applications where components need to exchange messages without being directly connected to each other. Publishers do not need to know which subscribers will receive the message, and subscribers do not need to know which application published it.

NCache supports Pub/Sub messaging over a distributed cache, allowing messages and topics to be managed across the cache cluster.

Pub/Sub Messaging Cache can be used for:

  • Event-driven applications.
  • Microservices communication.
  • Real-time notifications.
  • Asynchronous communication between distributed application components.

See Also

Admin Tools
NCache Architecture
Developer's Guide

Contact Us

PHONE

+1 214-619-2601   (US)

+44 20 7993 8327   (UK)

 
EMAIL

sales@alachisoft.com

support@alachisoft.com

NCache
  • 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