Testing our Redis example

Let's compile and test the tool. We will add three sessions of users:

cargo run -- add 7vQ2MhnRcyYeTptp a73bbfe3-df6a-4dea-93a8-cb4ea3998a53
cargo run -- add pTySt8FI7TIqId4N 0f3688be-0efc-4744-829c-be5d177e0e1c
cargo run -- add zJx3mBRpJ9WTkwGU f985a744-6648-4d0a-af5c-0b71aecdbcba

To print the list, run the list command:

cargo run -- list

With this, you will see all the sessions you have created:

LIST
Token: pTySt8FI7TIqId4N Uid: 0f3688be-0efc-4744-829c-be5d177e0e1c
Token: zJx3mBRpJ9WTkwGU Uid: f985a744-6648-4d0a-af5c-0b71aecdbcba
Token: 7vQ2MhnRcyYeTptp Uid: a73bbfe3-df6a-4dea-93a8-cb4ea3998a53

We've learned how to use Redis. It's useful to store messages for caching something. Next in line is the last NoSQL database we'll look at: MongoDB.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.34.197