• Webinars
  • Docs
  • Download
  • Blogs
  • Contact Us
Try Free
Show / Hide Table of Contents

Server Side API Prerequisites

In order to practically utilize the powerful features of Server Side NCache, make sure to implement the prerequisites discussed below.

Prerequisites

  • .NET/.NET Core
  • Java
  • Install either of the following NuGet packages in your application based on your NCache edition:
    • Enterprise: Alachisoft.NCache.SDK
    • Professional: Alachisoft.NCache.Professional.SDK
  • Include the following namespaces in your application based on the feature you intend to use:
    • Alachisoft.NCache.Runtime
  • 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 namespaces in your application based on the feature you intend to use:
    • import com.alachisoft.ncache.runtime.caching.*;
  • 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.

Feature Specific Namespaces

Aside from the namespaces employed in most features, you should add the following namespaces/packages 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.

  • .NET/.NET Core
  • Java
  • For Cache Loader and Refresher:
    • Alachisoft.NCache.Client
    • Alachisoft.NCache.Runtime.CacheLoader
  • For Data Source Providers:
    • Alachisoft.NCache.Runtime.DatasourceProviders
  • For Custom Dependency:
    • Alachisoft.NCache.Runtime.CustomDependencyProviders
    • Alachisoft.NCache.Runtime.Dependencies
  • For WAN Replication:
    • Alachisoft.NCache.Runtime.Bridge
  • For Entry Processor:
    • Alachisoft.NCache.Runtime.Processor
  • For Map Reduce:
    • Alachisoft.NCache.Runtime.MapReduce
  • For Aggregation in MapReduce
    • Alachisoft.NCache.Runtime.Aggregation
    • Alachisoft.NCache.Runtime.Processor
  • For Dynamic Compact Serialization:
    • Alachisoft.NCache.Runtime.Serialization
    • Alachisoft.NCache.Runtime.Serialization.IO
  • For Cache Loader and Refresher:
    • import com.alachisoft.ncache.runtime.cacheloader.*;
  • For Data Source Providers:
    • import com.alachisoft.ncache.runtime.datasourceprovider.*;
  • For Custom Dependency:
    • import com.alachisoft.ncache.runtime.customdependencyproviders.*;
    • import com.alachisoft.ncache.runtime.dependencies.*;
    • import com.alachisoft.ncache.runtime.dependencies.ExtensibleDependency.*;

See Also

How to Connect to Cache
Error Handling in Cache
Troubleshooting

Back to top Copyright © 2017 Alachisoft