In this example we work through how to remove a data cache using the specified key from a Redis Database inside Warewolf.
For more information on how to add data into the cache check out Redis Cache Example
Follow these simple steps below:
1.Click New to create a new workflow.
2. Search for the Redis Remove tool in the Tool Box.
3.Drag and drop the Redis Remove onto the design surface. The tool will open in large view.
4. From the Source, select the Source that you want to connect to. You will have created the source in the steps above or check out Adding a New Redis Source
In this example we connect to an Example Redis Source.
5. Once you have selected your Source, enter the Key.
6. Enter [[Result]] into the Result.
7. In the Variable list, mark it as output.
8. When you have configured the Redis Remove Tool, Click Done. It will now look like this:
9. Click Save. Name your Workflow and save.
10. Execute the previous workflow we created with Redis Cache to write data into the key.
11. Once you have done that, come back to your Redis Remove workflow and execute.
You will see the following the outputs.
The [[Result]] variable returned Success which means the key was removed from the Redis Database.
12. Execute the workflow again. The [[Result]] variable returned Failure which means the key did not exist in the Redis Database