Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: session-store-with-clerk example #43

Open
osseonews opened this issue Mar 11, 2024 · 0 comments
Open

Question: session-store-with-clerk example #43

osseonews opened this issue Mar 11, 2024 · 0 comments

Comments

@osseonews
Copy link

osseonews commented Mar 11, 2024

In the session-store-with-clerk example, you have 2 Redis storages for the cart, usercart:${userId} (cart as a set) and user:${userId} (cart hash) and then for each cart action you execute 2 different cart functions, for example:

await redis.smembers(`usercart:${userId}`);
    const flatitems = await redis.hgetall(`user:${userId}`);

What is the point of having 2 Redis stores for the cart, one a hash and one a set? Why is there a usercart:userId store and a user:userId store? Your actually tutorial on your website only references the user:userId store as a hash, so what purpose does the other store serve?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant