Conventions
In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.
A block of code is set as follows:
var redis = require("redis"); // 1 var client = redis.createClient(); // 2
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
var redis = require("redis"); // 1 var client = redis.createClient(); // 2 console.log("Redis Essentials"); // 3
Please note that all the code snippets in this book will have inline comments with numbers. After the code is presented, it will be explained by referencing those numbers.
Each command line starts with a dollar sign ($):
$ redis-server
The following conventions are used in this book for redis-cli:
- Commands are written in bold uppercase letters (SET).
- Keys are written in italicized lowercase letters (GET mykey).
- Values are written without any text formatting (SET mykey "my value").
$ redis-cli 127.0.0.1:6379> SET mykey "my value"
In this book, all filenames, function names, and variable names are written in italics. Examples:
- Create a file called my-filename.js.
- Execute the function myFunctionName.
- Create a variable called myVariableName.
All data types will be shown with the first letter capitalized (for example, Strings, Lists, Bitmaps, Sets, Sorted Sets, and HyperLogLogs) so that we can distinguish between a Redis data type and another existing term.
Note
Warnings or important notes appear in a box like this.
Tip
Tips and tricks appear like this.