• Webinars
  • Docs
  • Download
  • Blogs
  • Contact Us
Show / Hide Table of Contents
  • Administrator's Guide
  • NCache Architecture
    • Cache Topologies
    • Cache Cluster
    • Local Cache
    • Cache Client
    • Client Cache
    • Data Load Balancing
    • Cache Server Backward Compatibility
    • Client Backward Compatibility
    • Eviction
    • Indexing
    • Runtime Data Sharing
    • Portable Data Types
    • Class Versioning
    • IP Binding with Multiple NICs
    • Graceful Node Down
    • Separate Cache Host Process
    • Self Healing Dynamic Clustering
  • Configuring Caches
    • Create Cache
      • Creating Local Cache
        • Create New Cache
        • Add Existing Cache
      • Creating Clustered Cache
        • Create New Cache Cluster
        • Add Existing Cache Cluster
    • Remove Cache
    • Clear Cache Contents
    • Adding Server Node in Cache Cluster
    • Removing Server Node from Cache Cluster
    • Configuring Basic Cache Settings
      • Cache Size
      • Cache Isolation Levels
      • Cache Data Expiration
      • Cache Data Format
    • Configuring Cache Cluster Settings
      • Ports
      • Operation Timeout
      • Static Replication Interval
      • Connection Retries
      • Retry Interval
    • Add Test Data to Cache
    • Deploy Providers
    • Configuring Query Indexes
    • Registering Classes for Compact Serialization
      • Registering Non-Generic Classes
      • Unregistering Non-Generic Classes
      • Registering Generic Classes
      • Registering Generic Classes Using Generic Type Handler
    • Registering Classes for Portable Data Sharing
    • Configuring Data Source Providers
      • Read-Through Provider
      • Write-Through Provider
      • Write-Through Provider for Write-Behind Operations
    • Configuring Cache Startup Loader
    • Configuring Cache Level Events
    • Configuring Cache Activity Events
    • Configuring Eviction Policy
    • Configuring Compression
    • Configuring Email Notifications
    • Binding Cluster and Client/Server IP with Multiple NICs
      • Binding Cluster with a Dedicated IP
      • Binding Client/Server with a Dedicated IP
    • Configuring Heartbeat
    • Configuring MapReduce
    • Configuring Communication Reliability
    • Auto Start Cache on Boot
    • Nagling
    • Dual Socket
    • Error Logging
    • Configuration Files
      • Client Side Configurations
        • Client Config
        • EFCaching Config
      • Server Side Configurations
        • Cache Config
        • Bridge Config
        • Security Config
      • Cache Server Configuration
  • Management Operations
    • Start Cache
    • Stop Cache
    • Restart Cache
    • Manage Cache Service on a Server Node
    • Apply Configuration
    • Hot Apply Configuration
    • Reset Configuration
    • Data Load Balancing
  • Configuring Cache Clients
    • Adding Client Node in Cluster
    • Removing Client Node from Cluster
    • Configuring Client Node Settings
    • Creating Client Cache
    • Enable Client Cache on Client Nodes
    • Disable Client Cache on Client Nodes
    • Removing Client Cache
    • Configuring Client Cache Settings
  • Configuring Security
    • Configuring Security for Cache Management
    • Configuring Security for Cache
    • Configuring Security for Client Nodes
    • Configuring Encryption for Cache
    • Configure SSL/TLS Encryption in NCache
  • Configuring Bridge for WAN Replication
    • Creating Clustered Bridge
    • Adding Clustered Caches to Bridge
    • Configuring Bridge Settings
    • Configuring Conflict Resolver
    • Changing Cache Syncronization Modes
    • Configuring Master Cache
    • Force State Transfer
    • Connect/Disconnect Cache in Bridge
    • Remove Cache from Bridge
    • Bridge Management
  • NCache on Docker
    • Using NCache Docker Images
    • Customize NCache Dockerfile
  • Monitoring NCache
    • Cache Counters
    • Monitoring Caches using NCache Manager
      • Changing Management Port of Cache Node
      • Configuring Counters to Display
      • Browse Cache Statistics
      • Cluster Health
      • Monitoring Cache Clusters using NCache Email Alerts
    • Monitoring Caches using NCache Monitor
      • Monitoring with Built-In Dashboard
      • Monitoring with Custom Dashboard
    • Monitoring Bridge using NCache Manager
    • Monitoring NCache using Windows PerfMon Tool
      • Monitoring Cache Server Counters Using PerfMon
      • Monitoring Cache Client Counters Using PerfMon
      • Monitoring Bridge Counters Using PerfMon
    • Logging in NCache
      • NCache Log Viewer
      • NCache Monitor Logging
      • Performance Counters Logging
      • Windows Event Logging
      • Email Notifications on NCache Events
      • Cache Server Logging
      • Client Side API Logging
      • Cache Event IDs
    • Troubleshooting NCache Monitoring
      • Computer Name Not Found
      • Diskperf Not Installed
      • No READ Access to the Perflib Subkeys
      • Unable to Connect to Remote Server
    • IPV6 Support
  • Upgrading NCache Versions
    • Live Upgrade NCache Version
    • Upgrade NCache Version Offline
  • Apply Windows Patches on NCache Server

Local Cache

Important

Local Cache is the only cache available in developer edition of NCache, but remote clients for local cache are not supported in this edition.

NCache supports a standalone non-clustered cache which resides on a single node. Local cache is similar in features with other clustered caches, i.e., it has all the caching features provided in any other caching topology, but it is not scalable or fault tolerant like clustered caches. As it is a single server cache, so its transactional capacity can’t be increased by adding multiple servers. Also, it creates a single cache instance (no backup or replica) thus if it goes down, all cached data is lost. Local cache is suitable for applications having a small number of clients with low activity or where applications don't need to cache large amount of data.

Isolation Levels

A local cache has two isolation levels:

  • InProc (In-process)

This isolation level means that cache resides inside the memory space of client application. As this type of cache exists inside the application process, so the response time is faster. In InProc, NCache keeps cached data as live objects (not in serialized form) which reduces the serialization/de-serialization cost. However, memory limitations can be faced since application and cache share the same memory. Also cached data in this case can’t be shared with applications running outside this process.

Since objects are stored in the same address space as the cache client, cache clients get the reference to cached objects instead of a copy. For multithreaded applications, where multiple threads are modifying the same object, these changes need to be synchronized using various synchronization techniques available in .NET framework.

Note

Although objects are not kept in serialized form in InProc caches, it is still required to have all objects marked as Serializable. NCache calculates the size of an object by serializing the objects which later helps in eviction when it is needed.

  • OutProc (Out-of-process)

This isolation level means that cache resides in a separate process (NCache service process) from the client application. Multiple clients (local and remote) can connect to the same cache to share data. Latency in this case is more than InProc cache because of communication cost outside the process.

OutProc local cache is suitable for situations when multiple clients application needs to access the same cached data. For example, in a web garden where each ASP.NET application runs in a separate worker process, OutProc cache should be used. Also in ASP.NET applications, using an InProc cache instance is not considered as the best option due to process memory limitation. However, note that there will be an overhead of transferring data between application process and the cache itself.

Back to top Copyright © 2017 Alachisoft