• Products
  • Solutions
  • Customers
  • Resources
  • Company
  • Pricing
  • Download
Try Playground
  • Configure Caches
  • Loader and Refresher
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
        • Persistent Distributed Cache
        • Pub/Sub Messaging Cache
        • Add Existing Clustered 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
    • Memory Dumps
    • Data Load Balancing
    • Invoke Refresher Dataset
    • Import/Export Cache Data
    • Import Lucene Indexes
    • 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
      • Static 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
      • Bind Cluster with a Dedicated IP
      • Bind Client/Server with a Dedicated IP
    • Heartbeat
    • Keep Alive
    • Client Death Detection
    • Communication Reliability
    • Auto Start Cache on Boot
    • Nagle's Algorithm
    • Dual Socket
    • Configuration Files
      • Client Side Configurations
        • Client Config
        • EFCaching Config
      • Server Side Configurations
        • Cache Config
        • Bridge Config
        • Modules Config
        • Security Config
        • TLS Config
        • Monitoring Config
        • Emails Template
  • Cache Server Settings
    • Server Connectivity
    • Bind to Multiple NICs
    • Server Ports
    • Memory
    • Custom Dependency
    • Request Inquiry
    • Windows Events
    • Message Events
    • Expiration & Eviction
    • SQL Server
    • Logging
    • Monitoring
    • Persistence Data Loading Retries
    • Miscellaneous 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
      • Distributed Lucene Cache Counters
      • Cache Client Counters
      • Bridge Counters
    • Monitor NCache using the NCache Management Center
      • Using Tabular Statistics
        • Configure Counters to Display Caching Statistics
        • Configure Counters to Display Pub/Sub Statistics
        • Configure Counters to Display Lucene Statistics
        • Configure Counters to Display Bridge Statistics
        • Browse Cache Statistics
        • Monitor Bridge
      • Using Monitoring Dashboards
        • Configure Monitor Settings
        • Configure Event Logging
        • Configure API Logging
        • Monitor with a Built-In NCache Monitor Dashboard
        • Monitor with the NCache Monitor Custom Dashboard
        • Monitor Cluster Connectivity
        • Monitor Cache Clusters using NCache Email Alerts
    • Monitor Cache Using Command Line Tools
      • Monitor Cache Server Statistics with Command Line Tools
      • Monitor Cache Client Statistics with Command Line Tools
    • Monitor NCache Using Windows PerfMon Tool
      • Monitoring Cache Server Counters using PerfMon
      • Monitoring Cache Client Counters using PerfMon
      • Monitor Bridge Counters Using PerfMon Tool
    • Monitor NCache using Prometheus
    • Monitor NCache using Grafana
    • Monitor NCache Using SNMP Counters
    • Monitor NCache Using JMX Counters
    • 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

Configure Cache Loader and Refresher

The cache loader and refresher can be configured by adding cache loaders and refreshers using the NCache Management Center and deploying them accordingly. You may also add and remove datasets as their importance rises and falls.

Note

Before configuring the cache loader and refresher, make sure that the cache is stopped.

Configure Cache Loader/Refresher 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.

  • Against the cache name, click on View Details.

View Details

  • This opens up the detailed configuration page for the cache. Go to the Advanced Settings tab and click on Cache Loader/Refresher in the left bar.

  • Check the Enable Cache Loader and Refresher checkbox to enable other configuration options.

Configure the Cache Loader

Important

For Java, before deploying your JAR files, ensure that your Environment Variable for Java Home is set and have the appropriate JDK installed as discussed in the NCache Installation Guide.

  • Click on the Browse button against Assembly Name to select the assembly implementing the CacheLoader interface.

Browse Loader Assemblies

  • The name of the selected assembly will appear in Assembly Name and any classes implementing the user-defined interface will be listed in the Class Name list box.

  • Select the required class.

  • You can also add the parameters for your cache loader implementation, if required. Provide the Parameter name and Value and click on + to add the parameters. These will be displayed in the box with the option to remove the parameter.

Cache Loader Web Parameters

Note

Specifying parameters is optional. It is only required if your implementation of CacheLoader requires parameter(s) during initialization.

  • You can add Datasets to your loader implementation as well. A Dataset is a way for you to group similar data - so it loads together. This also makes refreshing the data easier. Under the Datasets section, click on the Add Dataset button. This will take you to the following screen, where you need to give your dataset a meaningful name.

NCache Loader Refresher Add Dataset Page

  • Click on OK and Save Changes to save your cache loader's configuration.

Configure the Cache Refresher

To configure the Cache Refresher, you must provide Datasets to your implementation, in the same way you've done for the Cache Loader.

  • Refreshing any dataset is optional. But if you plan on using Cache Refresher to refresh the dataset, you need to check the Refresh this dataset at the following schedule checkbox.

  • You have the following four refresh scheduling options available:

    • Interval: Interval-based scheduling allows you to specify a recurring time after which you want the Execution service to refresh your dataset. This option takes value in minutes which are counted after the cache starts.
    • Daily: The daily scheduling option allows you to specify the exact time of the day at which you want the Execution service to refresh your dataset. This option provides you with a time chart, making it easier for you to choose the time. The time specified will be the local time of your coordinator node.
    • Weekly: The weekly option allows you to specify the time as well as days of the week on which you want the Execution service to refresh your dataset. You can choose the time from the time chart and select the days from the list on the NCache Management Center.
    • Monthly: Monthly scheduling of Cache Refresher allows you to specify the time stamp, as well as the days of a month on which you want the Execution service to refresh your loaded dataset. You have the following two ways of selecting the days:
      • You can either specify the exact day of the month (as in number) OR
      • You can select weeks and their respective days.
  • Select the refresh schedule of your preference and click on the OK button to add the custom dataset to your Loader/Refresher implementation.

Note
  • Repeat the same process if you want to add more than one dataset.
  • To edit or remove a dataset, click on the Actions button against the dataset to perform the desired operation.

Under the Options section, you have multiple configurable options to customize the Cache Refresher usage.

  • Refresh Interval: This term refers to the interval after which the dedicated thread checks the cache for any datasets to refresh. By default, the refresh interval is 900 seconds. You may specify a different value using the Refresh-Interval box.
Note

The recommended value of the refresh interval is at least 600 seconds.

  • Number of Retries: This is the number of times NCache attempts a failed operation after its initial failure. By default, the number of retries is 0. You can specify if you want NCache to perform any failed operation again before proceeding to the next. Specify this number in the No. of Retries box.

  • Retry Interval: This is the interval by which the user determines how long to wait before trying to execute a failed operation. By default, the retry interval is 0 seconds, but you can configure it by adding a value in the Retry-Interval box.

  • Poll-Based Refresh Interval: You can also implement your method to trigger poll-based dataset refreshing. This is your custom implementation that is triggered after every Refresh Interval and returns a list of datasets that should either be refreshed immediately or within 24 hours. To enable this poll-based refreshing, check the "Poll for dataset names to refresh at every refresh interval" checkbox.

NCache Loader and Refresher Custom Configuration

Note

NCache allows the user to manually refresh a pre-configured dataset at runtime when desired through the NCache Management Center.

Deploy Cache Loader

Once the configurations have been made, now you have to Deploy Cache Loader to copy the cache loader and refresher assemblies to all sever nodes. To deploy the Cache Loader, follow the steps mentioned below:

  • Click on Deploy Cache Loader button.

Deploy Cache Loader

  • Browse for required assemblies.

  • After you have selected the desired assemblies, save all the configurations to apply the changes.

Note

If there is a change in the provider code, you must redeploy the provider. For the .NET Edition, you must stop the cache, deploy the provider, and restart the cache. Alternatively, in the Java Edition, you need to stop the NCache Execution Service, deploy the provider, and then start the NCache Execution Service.

Note

While using the NCache Execution Service, ensure that the user has administrative rights.

Add the Startup Loader

The Add Startup Loader tool enables the users to configure the startup loader and refresher provider for the cache which loads the configured datasets from the data source to the cache whenever the cache starts.

This command configures a startup loader for a cache named demoCache. The assemblies to be deployed are placed at the specified path and the default port 8250.

  • Windows
  • Linux
Add-StartupLoader –CacheName demoCache –AssemblyPath C:\Loader.dll -Class StartupLoader.Loader
add-startuploader -cachename demoCache -assemblypath /usr/share/Provider.jar -class StartupLoader.Loader

Add the Loader Dataset

The Add Loader Dataset tool enables the users to add datasets to a cache with cache loader and cache refresher configured.

This adds dataset on cache loader/refresher configured demoCache that will refresh itself after an interval of 5 minutes from cache start.

  • Windows
  • Linux
Add-LoaderDataset -Dataset order -CacheName demoCache -ScheduleExpression 0:00:00:05 -ScheduleOption DailyInterval
add-loaderdataset -dataset order -cachename demoCache -scheduleexpression 0:00:00:05 -scheduleoption DailyInterval

Remove the Loader Dataset

The Remove Loader Dataset tool enables users to remove dataset from the cache with enabled cache startup loader and cache refresher.

This removes a dataset from a cache named demoCache.

  • Windows
  • Linux
Remove-LoaderDataset -CacheName demoCache -Dataset "product"
remove-loaderdataset -cachename demoCache -dataset "product"

Remove the Startup Loader

The Remove Startup Loader tool enables the users to remove the preconfigured loader and refresher from the specified cache.

It removes the startup loader/refresher for the cache named demoCache using the default port.

  • Windows
  • Linux
Remove-StartupLoader –CacheName demoCache
remove-startuploader –cachename demoCache

See Also

Register Classes for Portable Data Sharing
Register Classes for Compact Serialization
Compression
Map​Reduce

In This Article
  • Configure Cache Loader/Refresher Using the NCache Management Center
    • Configure the Cache Loader
    • Configure the Cache Refresher
    • Deploy Cache Loader
    • Add the Startup Loader
    • Add the Loader Dataset
    • Remove the Loader Dataset
    • Remove the Startup Loader
  • See Also

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