In this article, we are going to learn how to install the Redis cache on Windows.
What is Redis?
Redis is an open-source (BSD licensed) and in-memory data structure store which works on a key-value pair. Redis is commonly used for cache. In this strategy, the application first looks into the cache to retrieve the data. Caching improves application response time by storing copies of the most frequently used data.
What does “BSD licensed”?
BSD licenses are a family of permissive free software licenses, imposing minimal restrictions on the use and distribution of the covered software. This is in contrast to the copyleft licenses which have share-alike requirements.
Redis for Windows
The current version of Redis available for download is 3.2.100.
You can download Redis for Windows from here.
After downloading, let’s install Redis on our Windows machine.
Double click downloaded MSI file – Redis-x64-3.0.504.msi (Microsoft Installer)
Installing Redis on Windows Using the MSI file
Execute the downloaded MSI file on your system. The installer window will open. Click Next.
On the next screen, set the Destination Folder for your Redis application. Let’s leave it with the default value
After setting the destination folder, we need to set the port number for Redis to run. The default port number is set to “6379”.
Next, set the Max Memory Limit.
The default memory limit is 100 MB. If you want to set more than that, then click on the checkbox and enter your value.
After clicking on the Next button, it will show the “Install” button. Just click on it to install the product.
The folder structure is shown in the below figure
Running the Redis command-line interface (CLI)
To use the built-in Redis Client, we are going to open the folder location where we have installed Redis on Windows and from there, open “redis-cli.exe” to run the command line to Redis Server.
If you double-click on “redis-cli.exe”, it will execute the CLI.
We enter the first command as ping with the pings server. That Server sends a response as “PONG”.