Skip to main content

Garnet Setup Guide for Windows

What is Garnet?

Garnet is a Microsoft Research project. It is a Windows-native in-memory cache that adheres to the Redis API.
Jadu recommends using it for caching on all WISP servers running Jadu Central 4.0 and above.


Prerequisites

  • Windows Server or Desktop
  • Administrator access
  • PHP and IIS installed (for Jadu)
  • Jadu Central 4.0+

Step 1: Install the .NET SDK (8.0)

Download and install the .NET SDK 8.0:


Step 2: Download and Extract Garnet

Download the 64-bit Garnet "ready-to-run" package:

Unzip the package, and locate the folders:

net9.0/
net8.0/

Use the net8.0 version. Copy its contents into a convenient location, e.g.:

C:\Garnet

Step 3: Configure Garnet

Open the garnet.conf file and add the following configuration:

{
"Port": 6379,
"Address": "127.0.0.1",
"MemorySize": "512mb",
"LogLevel": "Information",
"LogFile": "C:/Garnet/logs/garnet.log",
"DataDir": "C:/Garnet/data/",
"AppendOnly": true,
"AppendFilename": "appendonly.aof"
}

Step 4: Create Garnet as a Windows Service

  1. Open Command Prompt or PowerShell as Administrator.
  2. Run the following command:
cd C:\Garnetsc create Garnet binPath= "\"C:\Garnet\Service\Garnet.worker.exe\" --config-import-path \"C:\Garnet\garnet.conf\"" start=auto
  1. Start the service:
sc start Garnet

Or start it from Windows Services GUI (search for “Services” in the Start Menu).


Step 5: Install Redis Extension for PHP

5.1 Download Redis Extension

Download the NTS x64 build matching your PHP version:

Extract and copy the DLL file into:

C:\php\ext

5.2 Enable the Extension in php.ini

Edit C:\php\php.ini and add:

extension=redis

Restart IIS to apply the changes.


Step 6: Configure Jadu to Use Redis (Garnet)

6.1 Update config/datastore.xml

Add or update the following block:

<redis>
<servers>
<server host="127.0.0.1" port="6379"/>
</servers>
</redis>

6.2 Update config/system.xml

Specify Redis as the cache data store:

<cache_data_store>redis</cache_data_store>

6.3 Clear cache

Clear the XML config cache for the changes to take effect. Either use the command below to clear out all of the cache, or manually navigate to the cache folder and remove all of the .cache files from the top level.

php cli.php cms:clear-cache

Optional: Verify Garnet Is Working

Option 1: Use Redis Insight GUI

Install a Redis-compatible GUI client such as Redis Insight:

Connect to:

Host: 127.0.0.1  
Port: 6379

You should be able to see keys and values being cached.

Option 2: Use Command-Line Redis Client

You can also use any Redis CLI tools to ping or query the server:

redis-cli -h 127.0.0.1 -p 6379 ping
# Output should be: PONG

Notes

  • Ensure port 6379 is not blocked by Windows Firewall
  • Logs are available in: C:/Garnet/logs/garnet.log
  • Use Task Manager or services.msc to check if the Garnet service is running