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?
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:
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?