Data Caching in Java Sample Application
NCache provides a sample application for Java on GitHub. This section will guide you through setting up and using this sample application for data caching.
Important
Before getting started with NCache in Java, take the following prerequisites under consideration:
- JDK 17 is installed.
- The Environment Variable for Java is set.
NCache Demonstration for Java Data Caching Sample
Follow the steps mentioned here to see how NCache is used to perform various operations on your Java application's data.
Step 1: Download Sample from GitHub
Go to the NCache repository on GitHub and download the entire repository or the data caching sample you are interested in.
Step 2: Launch the Project
Launch your Java data caching sample application in a Java IDE of your choice. For example, IntelliJ 2019 or above.
Step 3: Configure Settings
After launching the project, locate and open the web.xml file where you have to change the name of your cache to the one created before.
Step 4: Build and Run Sample
Once the application settings have been configured, build and run your application.
Step 5: Monitor NCache
Go to the NCache Management Center, and against the cache you have created previously, click on Monitor. You will see the counters dashboard projecting the change in the cache.
See Also
Create Distributed Cache
Create Distributed Cache with Persistence
Use NCache for .NET Caching