Skip to content

Commit

Permalink
Revert "Use a longer redis expiry time for user details"
Browse files Browse the repository at this point in the history
This reverts commit be2f123.
  • Loading branch information
nygrenh committed Aug 20, 2024
1 parent be2f123 commit bb98b52
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/api/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export function getUser({ knex, logger }: BaseContext) {
async () => await client.getCurrentUserDetails(),
{
prefix: "userdetails",
expireTime: 604800,
expireTime: 3600,
key: hashUserToken(rawToken),
},
{
Expand Down
2 changes: 1 addition & 1 deletion backend/middlewares/fetchUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const setContextUser = async (ctx: Context, rawToken: string) => {
},
{
prefix: "userdetails",
expireTime: 604800,
expireTime: 3600,
key: hashUserToken(rawToken),
},
ctx,
Expand Down
2 changes: 1 addition & 1 deletion backend/wsServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ wsServer.on("request", (request: any) => {
if (!user) {
user = await getCurrentUserDetails(accessToken)
await redisClient?.set(accessToken, JSON.stringify(user), {
EX: 604800,
EX: 3600,
})
}
const userCourseObject = {
Expand Down

0 comments on commit bb98b52

Please sign in to comment.