NCache Playground
This section guides you through the process of launching and using the NCache Playground via the Alachisoft Website.
Playground Usage Options
As you can see above, Playground offers users two options, Basic and Sandbox Sessions. These provide different levels of control and flexibility when simulating NCache usage.
Basic
This option lets you run various provided .NET and Java samples in your browser against a running NCache instance. These samples provide output through a command prompt. They let you become familiar with and understand the NCache API without having to download or install NCache.
Sandbox Sessions
This option lets you start a 30-minute session to edit and run samples against a 2-node NCache cluster from your browser using temporary credentials, as demonstrated below. When employing this option, you can use NCache's powerful monitoring and management features like the NCache Management Centre, Monitor, and Statistics.
Navigating the Playground
Note
The features and operations are applicable for both, the NCache Installer and the instance of NCache Playground available on the NCache Website.
Selecting the Preferred Language
NCache Playground gives you the option to select between the .NET and Java by the dropdown menu available on navigation bar of the Playground if using the Basic Session.
You can also switch between langaguages if you are using Sandbox Sessions this way. However, you also have the option to choose which language to opt for when you begin, as follows:
Warning
If you opt for the .NET Edition when logging in to a Sandbox Session you will not be able to execute the Java Server Side samples. Similarly, if you opt for the Java Edition when logging in to a Sandbox Session you will not be able to execute the .NET Server Side samples.
Samples Menu
When you open .NET or Java as part of Sandbox Sessions, you can find a series of code snippets showcasing various features and common caching use cases, as shown below:
Sample Execution
NCache Playground provides users with the ability to edit, compile, and run .NET and Java code samples in Sandbox. The following samples demonstrate how to use EFCore Resultset for .NET and Hibernate Caching for Java.
NCache Playground currently offers various samples for .NET and Java:
.NET Samples
- Basic Caching Operations
- Cache Item Locking
- Groups & Tags
- EF Core Resultset
- SQL Query
- EF Core LINQ
- Data Structures
- Pub Sub Messaging
- Read-Through
- Write-Through
- Loader
- Refresher
Java Samples
- Basic Caching Operations
- Cache Item Locking
- Grouping Cache Data (Tags)
- Hibernate Caching
- SQL Query (Find Data in Cache)
- Spring Data Caching
- Data Structures (List & Queue)
- Pub Sub Messaging
- Read-Through
- Write-Through
- Loader
- Refresher
Manage and Monitor
You can also manage and monitor NCache via the NCache Playground, as demonstrated below, while using Sandbox Sessions.
Server-side Tab
For the server-side samples available (Read-Through, Write-Through, Loader, and Refresher) the Playground offers code clarity by seperating the necessary client-side operations from the server-side deployment as demonstrated below:
Important
Your cache will be automatically restarted if you employ the Compile & Run option for these server side codes.
Note
You can also utilize the Server Logs provided in the secondary output tab, to further understand these server-side and diagnose any issues.
More Info
The More Info tab provides you with details about the API used in the sample, along with the documentation links related to those APIs. These links help you troubleshoot any issues you may encounter as shown below.