January 2019
Intermediate to advanced
520 pages
14h 32m
English
The tool that we are creating for Redis will support three commands:
We need constants for the name of every subcommand to prevent mistakes in strings in the code:
const SESSIONS: &str = "sessions";const CMD_ADD: &str = "add";const CMD_REMOVE: &str = "remove";const CMD_LIST: &str = "list";
This list also contains the SESSION constant as the name of the HashMap in Redis. Now, we can declare functions to manipulate session data.
Read now
Unlock full access