javascript - Trying to pull from a redis cache -


i new-ish programming , developing app has email verification step. i'm hoping take information input fields, save in cache, pull cache when users verfication page through uuid in email.

my steps far to:

  1. save username , password enter in registration page redis cache called 'users' username, password, , uuid keys , values

  2. set cookie user containing uuid when return can pull username , password cache based on uuid-based query cookie. (this having trouble, can't figure out how search redis cache field value).

  3. once username , password can accessed via cache uuid, inserting them postgres db.

any thoughts? or links redis documentation?

another thought is, should using hash rather set? cachers rescue please!

you don't search redis server, access key. critical piece of understanding. also, aren't using cache can useful not refer one.

the trick designing redis data structure determine how use when pull data , store way, not store figure out.

here how, if had to, i'd structure doing in redis: given uuid. create redis hash uuid name of hash. hash have key/value pairs (or members) of username, password (please @ least store encrypted), , other key/value pairs use in session.

this allows access precisely data after, , can uuid. uuid identifies particular collection of data.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -