Client Side API Prerequisites
In order to practically utilize the powerful features of Client Side NCache, make sure to implement the prerequisites discussed below.
Prerequisites
- Install either of the following NuGet packages in your application based on your NCache edition:
- Include the following namespaces in your application:
- The cache must be running.
- Make sure that the data being added is serializable.
- To ensure the operation is fail-safe, it is recommended to handle any potential exceptions within your application, as explained in Handling Failures.
- To handle any unseen exceptions, refer to the Troubleshooting section.
- Add the following Maven dependencies in your
pom.xml
file:
<dependency>
<groupId>com.alachisoft.ncache</groupId>
<!--for NCache Enterprise Edition-->
<artifactId>ncache-client</artifactId>
<!--for NCache Professional Edition-->
<artifactId>ncache-professional-client</artifactId>
<version>x.x.x</version>
</dependency>
- Import the following packages in your application:
- The cache must be running.
- Make sure that the data being added is serializable.
- To ensure the operation is fail-safe, it is recommended to handle any potential exceptions within your application, as explained in Handling Failures.
- To handle any unseen exceptions, refer to the Troubleshooting section.
- Add the following Maven dependencies in your
pom.xml
file:
<dependency>
<groupId>com.alachisoft.ncache</groupId>
<!--for NCache Enterprise Edition-->
<artifactId>ncache-scala-client</artifactId>
<!--for NCache Professional Edition-->
<artifactId>ncache-scala-professional-client</artifactId>
<version>x.x.x</version>
</dependency>
- Import the following packages in your application:
- The cache must be running.
- Make sure that the data being added is serializable.
- To ensure the operation is fail safe, it is recommended to handle any potential exceptions within your application, as explained in Handling Failures.
- To handle any unseen exceptions, refer to the Troubleshooting section.
- Install and include either of the following modules in your application based on your NCache edition:
- Include the following class in your application:
- The cache must be running.
- The application must be connected to cache before performing the operation.
- For API details refer to the links provided with every code snippet.
- To ensure the operation is fail-safe, it is recommended to handle any potential exceptions within your application, as explained in Handling Failures.
- To handle any unseen exceptions, refer to the Troubleshooting section.
- Install either of the following Python packages in your application based on your NCache edition:
- Import the following packages in your application:
- The cache must be running.
- To ensure the operation is fail safe, it is recommended to handle any potential exceptions within your application, as explained in Handling Failures.
- To handle any unseen exceptions, refer to the Troubleshooting section.
Feature Specific NuGet Packages
Aside from the NuGet Packages employed in most features, you should add the following packages based on the feature you intend to use.
Note
Any feature not mentioned in the list below either does not work with the specified feature or only requires the general NuGet Packages that we've previously discussed.
- For CLR Procedures:
- For LINQ Queries:
- For Full Text Searching with NCache Distributed Lucene:
Feature Specific Namespaces
Aside from the namespaces employed in most features, you should add the following namespaces/packages/classes based on the feature/API you intend to use and whether or not they require them.
Note
Any feature not mentioned in the list below either does not work with the specified feature or only requires the general namespaces/packages/classes.
- For Tags, Named Tags, Locking, and Expirations:
- For Cache Data Dependencies e.g. KeyDependency, FileDependency & Database Dependencies:
- For JSON Data:
- For Data Structures:
- For SQL Queries:
- For LINQ Queries:
- For Event Notifications & Continuous Query:
- For Pub/Sub:
- For Full Text Searching with NCache Distributed Lucene:
- For Lucene Search:
- For Lucene Facet:
- For Geo-Spatial API
- For Tags, Named Tags, Locking, and Expirations:
- For Cache Data Dependencies e.g. KeyDependency, FileDependency & Database Dependencies:
- For JSON Data:
- For SQL Queries:
- For Event Notifications & Continuous Query:
For Data Structures:
For Pub/Sub:
- For Tags, Named Tags, Locking, and Expirations:
- For Cache Data Dependencies e.g. KeyDependency, FileDependency & Database Dependencies:
- For JSON Data:
- For SQL Queries:
- For Data Structures:
- For Event Notifications & Continuous Query:
- For Pub/Sub:
- For Tags & Named Tags, and Expirations:
- For Cache Data Dependencies e.g. KeyDependency, FileDependency & Database Dependencies:
- For Data Structures:
- For Event Notifications & Continuous Query:
- For Pub/Sub:
- For Tags, Named Tags, Locking, Expirations:
- For Cache Data Dependencies e.g. KeyDependency, FileDependency & Database Dependencies:
- For SQL Queries:
- For Data Structures:
- For Pub/Sub:
See Also
How to Connect to Cache
Error Handling in Cache
Troubleshooting