• Facebook
  • Twitter
  • Youtube
  • LinedIn
  • RSS
  • Docs
  • Comparisons
  • Blogs
  • Download
  • Contact Us
  • Products
  • Solutions
  • Customers
  • Resources
  • Company
  • Pricing
  • Download
Download
  • Configure Client Cache
  • Create Client Cache
Show / Hide Table of Contents
  • Administrator's Guide
  • NCache Architecture
    • Cache Topologies
      • Partitioned Topologies
      • Replicated Topology
      • Mirrored Topology
      • Scalability in Topologies
    • Dynamic Clustering
    • Local Cache
    • Cache Client
    • Client Cache
    • Bridge for WAN Replication
    • Connectivity with Load Balancer
    • Serialization Format
    • Data Encryption
    • Data Compression
    • Data Load Balancing
    • Pipelining
    • Cache Server Backward Compatibility
    • Client Backward Compatibility
    • Eviction
    • Indexing
    • Split-Brain
    • Maintenance Mode
    • Runtime Data Sharing
    • Portable Data Types
    • Class Versioning
    • IP Binding with Multiple NICs
    • Graceful Node Down
    • Separate Cache Host Process
    • Self Healing Dynamic Clustering
    • Distributed Cache with Persistence
  • NCache Management Center
  • Configure Caches
    • Create a Cache
      • Local Cache Overview
        • Local Cache
        • Local Cache with Persistence
        • Pub/Sub Messaging Cache
        • Add Existing Cache
      • Clustered Cache Overview
        • Distributed Cache
        • Distributed Cache with Persistence
        • Pub/Sub Messaging Cache
        • Add Existing Cache
        • Troubleshooting
    • Remove Cache
    • Clear Cache
    • Add Server Node
    • Remove Server Node
    • Add Test Data
    • Configure Query Indexes
    • Configure JSON Query Indexes
    • Compact Serialization
      • Non-Generic Registration
      • Non-Generic Unregistration
      • Generic Registration
      • Using Type Handler
    • Deploy Providers
    • Configure Custom Dependency
    • Add Data Source Providers
      • Read-through Provider
      • Write-through Provider
      • Write-behind Provider
    • Loader and Refresher
    • Configure Maintenance Mode
      • Stop for Maintenance Mode
      • Exit Maintenance Mode
    • Configure LINQPad
      • Configure LinqPad for NCache
      • Querying Data in LinqPad
  • Configure Clients
    • Add Client Node
    • Remove Client Node
  • Configure Client Cache
    • Create Client Cache
    • Create Client Cache with NuGet
    • Enable Client Cache on Client Nodes
    • Disable Client Cache on Client Nodes
    • Remove Client Cache
  • Management Operations
    • Start Cache
    • Stop Cache
    • Restart Cache
    • Manage Cache Service on a Server Node
    • Data Load Balancing
    • Invoke Refresher Dataset
    • Import/Export Cache Data
    • Suspend/Resume NCache Data Persistence
    • Backup and Restore NCache Persisted Data
  • Cache Settings
    • General Cache Settings
      • Cache Size
      • Cache Isolation Levels
      • Cache Serialization Format
      • Cache Data Expiration
    • Cache Cluster Settings
      • Ports
      • Operation Timeout
      • Configure Pipelining
      • Statistic Replication Interval
      • Connection Retries
      • Retry Interval
      • Split-Brain Auto Recovery
    • NCache Persistence Settings
      • Store Information
      • Persistence Interval
    • Error Logging
    • Cache Level Events
    • Client Activity Events
    • Eviction Policy
    • MapReduce
    • Register Classes for Portable Data Sharing
    • Compression
    • Email Notifications
    • Bind IP with Multiple NICs
    • Heartbeat
    • Keep Alive
    • Client Death Detection
    • Communication Reliability
    • Auto Start Cache on Boot
    • Dual Socket
    • Configuration Files
      • Client Side Configurations
        • Client Config
        • EF Caching Config
      • Server Side Configurations
        • Cache Config
        • Bridge Config
        • Security Config
        • TLS Config
        • Monitoring Config
        • Emails Template
  • Cache Server Settings
    • Client Connectivity Settings
    • Bind to Multiple NICs
    • Server Ports
    • Memory
    • Custom Dependency
    • Request Inquiry
    • Windows Events
    • Message Events
    • Expiration & Eviction
    • SQL Server Dependency
    • Logging
    • Monitoring
    • Persistence Cache Settings
    • Security Settings
    • Pub/Sub Configuration
    • Nagle's Algorithm Setting
    • General Configurations
  • Bridge Server Settings
  • Cache Client Settings
  • Client Cache Settings
  • Configure Security
    • Configure Authentication and Authorization
    • Configure Encryption for Cache
    • Configure TLS Encryption
    • Configure HTTPS for NCache Management Center
  • Configure Bridge for WAN Replication
    • Create Bridge
    • Add Clustered Caches to Bridge
    • Configure Bridge Settings
    • Change Cache Synchronization Modes
    • Bridge Management
    • Synchronize Caches in Bridge
    • Leave Bridge
    • Remove Cache from Bridge
    • Configure Conflict Resolver
  • Setup Database for Cache Synchronization
    • Setup SQL Server Environment
    • Setup Oracle Database Environment
    • Setup OleDb Environment
    • Setup SQL Server for CLR Procedures
  • Simulate NCache Usage
  • Monitor Caches
    • Counters
      • Distributed Cache Counters
      • Distributed Cache with Persistence Counters
      • Pub/Sub Messaging Cache Counters
      • Cache Client Counters
      • Bridge Counters
    • Monitor NCache Using the NCache Management Center
      • Using Monitoring Dashboards
        • Configure Monitor Settings
        • Configure Event Logging
        • Configure API Logging
        • Built-in Dashboard
        • Custom Dashboard
        • Cluster Connectivity
        • NCache Email Alerts
      • Using Tabular Statistics
        • Configure Counters to Display Caching Statistics
        • Configure Counters to Display Pub/Sub Statistics
        • Configure Counters to Display Bridge Statistics
        • Browse Cache Statistics
        • Monitor Bridge
    • Monitor NCache Using Command Line Tools
      • Cache Server Statistics Using Command Line Tools
      • Cache Client Statistics Using Command Line Tools
    • Monitor NCache Using Windows PerfMon Tool
      • Cache Server Counters Using PerfMon
      • Cache Client Counters Using PerfMon
      • Bridge Counters Using PerfMon Tool
    • Monitor NCache Using Prometheus
    • Monitor NCache Using Grafana
    • Monitor NCache Using SNMP Counters
    • Monitor NCache Using JMX Counters
    • Memory Dumps
    • Logging
      • NCache Log Viewer
      • Performance Counters Logging
      • Windows Event Logging
      • Cache Health Alerts
      • Email Notifications on NCache Events
      • Cache Server Logging
      • Client Side API Logging
      • Cache Event IDs
      • Feature Usage Logging
    • Troubleshooting NCache Monitoring
      • Computer Name Not Found
      • Diskperf Not Installed
      • No READ Access to Perflib Subkeys
      • Unable to Connect to Remote Server
    • IPV6 Support

Create Client Cache

This cache exists on the client node. You can create a Client Cache by using the NCache Management Center or the appropriate PowerShell cmdlets. If you are using NuGet packages without any NCache client installation, refer to Create Client Cache with NuGet Package Installation.

Important

Ensure that you have an existing client node to create a Client Cache. To add a client node, please refer to the Add Client Node section.

Warning

You cannot create a Client Cache on a Pub/Sub Messaging store.

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. Against the Cache Name, click on View Details.

Create Client Cache

  • This opens the detailed configuration page for the cache.

  • In the Client Cache tab, click on the New button.

Create new Client Cache

  • At this point, the New Client Cache page opens.

  • Specify the Client Cache name and synchronization mode. Click Next.

Enter Client Cache Name

  • Next, you can either create a Regular or a Full-Data Client Cache.

Create a Regular Client Cache

To create a Regular Client Cache, follow the steps mentioned below.

  • Specify the type as Regular, choose the Maximum Size and Isolation Level for the Client Cache. The InProc cache lives inside the application process, whereas the OutProc cache lives in a separate service process. Click Next.

Regular Client Cache

  • In the Advanced Options dialog box, you can configure the following:

    • You can change the Eviction Policy and Eviction Percentage; items will be evicted from the cache using the selected policy and percentage value, if eviction is enabled.

    • You can change the Clean Interval value. Its default value is 15 sec.

    • You can make the cache start automatically after a service restart by selecting the checkbox "Auto start this cache on service startup".

Regular Client Cache

  • Click Finish.

Once completed, a Regular Client Cache will be created. This will prompt a success notification and the Client Cache tab will now show options to configure Client Cache settings.

Create a Full-Data Client Cache

To create a Full-Data Client Cache, follow the steps mentioned below.

Important

The Full-Data Client Cache cannot be created and refrence data types cannot be added while the clustered cache is running.

  • To create a Full-Data Client Cache, select the type as Full-Data, choose the Maximum Size and Isolation Level. Click Next.

Full-Data Client Cache

  • Add the Reference Data Types to configure the desired reference data types for your Full-Data Client Cache by clicking the Browse button. You cannot create a Full-Data Client Cache without configuring atleast one reference data type.

Full-Data Client Cache

  • The selected data types will appear in the Select Datatypes section in the same order you add them. You can also change the order of these types through the Move Up and Move Down buttons. This order will define the Eviction Priority for them, i.e., the data type added at the end will be evicted first.

  • You can also remove the selected reference data types through the Remove Selected Datatypes button.

Important

Strict Local Reads and Strict Query Enforcement only apply to reference data types that are configured in the Full-Data Client Cache.

  • In the case of queries, these are executed on the Client Cache first, and will fall back to the clustered cache only if the data is partially loaded in the Client Cache for configured reference data types. However, if you want queries to not fallback to the clustered cache, enable the checkbox "Throw an exception when querying a partially loaded dataset in the client cache, with no fallback to the clustered cache." With this option enabled, the query will not fallback to the clustered cache and will instead fail, throwing the exception: "Unable to execute query on client cache as the type '{queryFQN}' is partially loaded.", thus allowing for Strict Query Enforcment.

  • By default, all read operations check the Client Cache (L1) first, and if the data isn't found, they fall back to the clustered cache (L2). However, if you want to avoid this fallback and ensure reads are served strictly from the local cache, you can use the Strict Local Reads feature. With this enabled, any key not found in the Client Cache (L1) results in a cache miss, and no request is made to the clustered cache (L2). For this behavior, select the "Return a cache miss for any key not found in the client cache, with no fallback to the clustered cache" checkbox.

Important

If neither checkbox is selected and the data is only partially loaded, the search will fall back to the clustered cache.

Enable SQL Queries on Full-Data Client Cache

  • Click Next.

  • In the Advanced Options dialog box, you can configure the following:

    • You can change the Eviction Policy and Eviction Percentage; items will be evicted from the cache using the selected policy and percentage value.

    • You can configure the Data Reload Threshold. This specifies the percentage of the total cache size at which the evicted data should be reloaded from clustered cache into Client Cache.

    • You can make the cache start automatically after a service restart by selecting the checkbox "Auto start this cache on service startup".

Client Cache Web Advanced

  • Click Finish.

  • This will prompt a success notification and the Client Cache tab will now show options to configure Client Cache settings.

Important

If you make any configuration changes to the Full-Data Client Cache, you must restart the Client Cache.

Using Command Line Tools

You can also create the Client Cache using the PowerShell cmdlets. The following are the PowerShell cmdlets to create the Regular and Full-Data Client Cache respectively.

Regular Client Cache

The New-ClientCache tool enables the user to create a new Client Cache.

This command creates a Regular Client Cache named demoClientCache on client node 20.200.20.39 for an already registered clustered cache on server 20.200.20.40.

Note

If the Type parameter is not specified, a Regular Client Cache will be created by default.

  • Windows
  • Linux
New-ClientCache -CacheName demoCache -ClientCacheName demoClientCache -Type Regular -Server 20.200.20.40 -ClientNode 20.200.20.39
new-clientcache -cachename demoCache -clientcachename demoClientCache -type Regular -server 20.200.20.40 -clientnode 20.200.20.39 

Full-Data Client Cache

This command creates a Full-Data Client Cache named demoClientCache on the client node 20.200.20.39, linked to a clustered cache hosted on the server 20.200.20.40. The FailQueryOnPartialDataset switch parameter enforces Strict Query Enforcement and throws an exception if a query is executed on a partially loaded dataset, with no fallback to the clustered cache. The DisableL2FallbackOnMiss switch parameter enforces Strict Local Reads and returns a cache miss for any key not found in the client cache, without attempting to retrieve it from the clustered cache.

  • Windows
  • Linux
New-ClientCache -CacheName demoCache -ClientCacheName demoClientCache -Type FullData -Server 20.200.20.40 -Size 1024 -ClientNode 20.200.20.39 -Optimistic -FailQueryOnPartialDataset -DisableL2FallbackOnMiss
new-clientcache -cachename demoCache -clientcachecame demoClientCache -type FullData -server 20.200.20.40 -size 1024 -clientnode 20.200.20.39 -optimistic -failqueryonpartialdataset -disablel2fallbackonmiss

To add the required Reference Data Types in Full-Data Client Cache, execute the following PowerShell cmdlet:

Important

You cannot create a Full-Data Client Cache without configuring atleast one reference data type.

  • Windows
  • Linux
Add-ClientCacheRefDataType -CacheName demoCache -AssemblyPath C:\Data.dll -DataTypes Data.Customer
add-clientcacherefdatatype -cachename demoCache -assemblypath /usr/Data.dll -datatypes Data.Customer
Note

You can change the Client Cache settings/configurations using the Client Cache tab after creating it (where you can configure email alerts, error logging, compression, synchronization, data reload threshold, and more for the Client Cache). You can also choose to View Details for that particular Client Cache from the Local Caches screen by adding it as an existing cache.

See Also

Enable Client Cache on Client Nodes
Disable Client Cache on Client Nodes
Remove Client Cache
Management Operations

In This Article
  • Using the NCache Management Center
    • Create a Regular Client Cache
    • Create a Full-Data Client Cache
  • Using Command Line Tools
    • Regular Client Cache
    • Full-Data Client Cache
  • See Also

Contact Us

PHONE

+1 214-619-2601   (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 - 2025. All rights reserved. NCache is a registered trademark of Diyatech Corp.
Back to top