Skip to content

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

@osseonews

Description

@osseonews

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions