Client Cache Settings
This section explains how to configure some basic settings of the Client Cache such as Cache Size, Isolation Level, SQL Notification Mode, Client Polling Interval, Email Notifications, SMTP Server, and more.
Important
Make sure you create a Client Cache before attempting to configure its settings.
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 configure.
Select the cache name, click on View Details.
- This opens up the detailed configuration page for the cache. Go to the Client Cache tab.
Important
Make sure the cache client is disabled.
Your settings will vary depending on the type of Client Cache you have created — either a Regular Client Cache or a Full-Data Client Cache. The steps below will guide you to the relevant configuration screen.
Regular Client Cache
The following settings are available for configuring a Regular Client Cache:
- In the Main tab, you can change the Cache Size and Isolation Level. The Eviction Policy and Eviction Percentage can be changed only if Eviction is enabled.
- In the Options tab, you can enable Error Logging, Performance Counters, and Compression Threshold.
- You can also specify Custom SQL Notification Mode and Client Polling Interval.
In the Email Alerts tab:
Select the Enable Email Notifications checkbox, to enable the email notification feature.
Under the Email Settings, enter the sender's email in the Sender Email text box.
Enter the SMTP server in the SMTP Server text box.
Enter Port in the Port text box.
Select the TLS checkbox if needed, and choose the appropriate TLS Version from the dropdown list.
Select the Authentication Required checkbox if required and enter the login and password.
Specify recipients’ email addresses in the Email Address text box and click on +.
Check the cache events (Cache Start, Cache Stop, and Cache Size) for which you want to receive notifications from NCache.
- Click on Save Changes to apply this configuration to the cache.
Full-Data Client Cache
The following settings are available for configuring a Full-Data Client Cache:
Important
If you make any configuration changes to the Full-Data Client Cache, you must restart the Client Cache.
- In the Main tab, you can change the Cache Size, Isolation Level, Eviction Policy, and Eviction Percentage. Please note that Eviction cannot be disabled in Full-Data Client Cache.
In the Full-Data Cache Settings tab, you can:
- Configure the Data Reload Threshold as a percentage of the total cache size. When enough space is freed due to evictions, NCache will reload data for affected data types.
Important
You need to stop the clustered cache so you can make any changes to the configured reference data type(s) settings of the Full-Data Client Cache.
Under Reference Data Types, the configured reference data types are listed.
Click the Add button to add a new reference data type.
To remove a reference data type, select it from the list and click the Remove button.
Use Move Up and Move Down to adjust the order of data types. The order defines Eviction Priority—the last one is evicted first.
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 type(s). 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 fail and throw the exception: "Unable to execute query on client cache as the type '{queryFQN}' is partially loaded," thereby enforcing Strict Query Enforcement.
By default, all read operations execute on 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, "Return a cache miss for any key not found in the client cache, with no fallback to the clustered cache." This ensures that all read operations rely solely on the Client Cache, enforcing Strict Local Reads and returning a cache miss for any key that is not found locally.
Important
If neither checkbox is selected and the data is only partially loaded, the search will fall back to the clustered cache.
- When you click on Add button, a dialog box appears allowing you to select the data type to include.
The Options and Email Alerts tabs for the Full-Data Client Cache offer the same settings and configurations as those described earlier for the Regular Client Cache.
Click on Save Changes to apply this configuration to the cache.
See Also
Cache Settings
Cache Server Settings
Configure Security
Cache Client Settings