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

Create New Distributed Lucene with Persistence Cache

A Distributed Lucene with Persistence cache can be created through NCache Web Manager and PowerShell.

Note

A Distributed Lucene with Persistence is supported for Partitioned Topologies and Local (out-proc) caches.

Prerequisites

Make sure NCache Service is started. If it is not started, do the following:

  • Windows Environment
  • Linux Environment
  • For .NET, type the following command in PowerShell (run as admin):
Start-Service -Name NCacheSvc
  • For .NET Core, run NCacheSvc as Administrator.

In a terminal of your choice, type the following command:

> sudo systemctl start ncached

Using NCache Web Manager

  • Launch NCache Web Manager by browsing to http://localhost:8251 or <server-ip>:8251 on Windows and Linux.

  • In the left navigation bar, click on Clustered Caches. This opens up the Clustered Caches page at <server-ip>:8251/ClusteredCaches/. The page shows any existing clustered caches on your machine and additional details like Topology, Servers and Server Platform.

  • To create a new Distributed Lucene with Persistence cache, click on New.

Create Distributed Lucene Cache Web

  • From the In-Memory Store Type dropdown menu, select Distributed Lucene with Persistence and specify the name of your cache. Click Next.
Note

Distributed Lucene with Persistence supports JSON serialization only.

Create Distributed Lucene Cache Web

  • Select the caching topology and any advanced options like Operation Timeout and Statistic Replication Interval. Click Next.
Note

Distributed Lucene with Persistence only supports the Partitioned and Partition-Replica Topologies.

Select Caching Topology for Distributed Lucene Cache Web

  • Specify the Cache Partition Size of the cache and add your cluster nodes by specifying the node IP address and clicking on Add Node button. To add more nodes, click Add Node. Click Next once all the required nodes are added.
Warning

If a cache with the specified name already exists, you are prompted with an error message.

Select Nodes for Distributed Lucene Cache Web

  • You have two options, Create new indexes and Use existing indexes. Chose the former option and specify your index path in the field next to the Index Path label. The default path is C:\ProgramData\ncache\lucene-index. Once done, click on Validate Path. Once your Index Path has been validated, you will be prompted with a success notification and path will be updated as C:\ProgramData\ncache\lucene-index\demoClusteredCache. Click Next.
Warning

Unless the index path has been validated successfully, you can't proceed further with the cache creation process.

Validate Index Path for Distributed Lucene Cache Web

  • Change the Cluster Port and Port Range if required. Enable pipelining for the cache if required by checking the Enable Pipelining checkbox. Set the Batch Interval for the duration after which the commands will be transmitted over the network in microseconds. Click Next.

Specify TCP Parameters for Distributed Lucene Cache Web

  • If you want to enable encryption and compression, check the Enable Encryption and Enable Compression checkboxes. If enabled, set the Providers and Key for encryption and Threshold Size for compression. Click Next.

Encryption and Compression for Distributed Lucene Cache Web

  • In Advanced Options page, you can configure the following settings:

    • Eviction is disabled by default.

    • You can change the Clean Interval value. Default is 15 seconds.

    • This cache can be started automatically upon the completion of this process if you have check the Start this cache on finish checkbox.

    • You can make the cache to start automatically after service restart by checking the checkbox Auto start this cache on service startup.

Eviction for Distributed Lucene Cache Web

  • Click Finish to complete the process. Your created cache will appear in Clustered Caches page with the server nodes and their status and a success notification will be displayed in the notification panel.

Create Distributed Lucene Cache Web

Using PowerShell

You can use the PowerShell to manage Distributed Lucne caches by using the NCache supported PowerShell cmdlets.

Create Cache

The New-Cache PowerShell cmdlet is responsible for creating new caches.

The following command creates a cache named demoClusteredCache on the nodes 20.200.20.47 and 20.200.20.39. The InMemoryStoreType is specified as DistributedLuceneWithPersistence and LuceneIndexPath is provided as C:\ProgramData\ncache\lucene-index. The Topology is set as PartitionedOfReplica.

New-Cache -Name demoClusteredCache -Server "20.200.20.47,20.200.20.39" -Size 1024 -InMemoryStoreType DistributedLuceneWithPersistence -LuceneIndexPath "C:\ProgramData\ncache\lucene-index\" -Topology PartitionedOfReplica

See Also

Start Cache
Add Server Node
Add Existing Cache
Remove Cache
Clear Cache

Back to top Copyright © 2017 Alachisoft