refactor 6 month retention. use auth instead of cache:website
This commit is contained in:
1 parent
37b6194c5f
commit
741c6039e6
29 files changed
+43
-48
No files matched your search
+2
-8
@@ -39,14 +39,8 @@ export async function fetchSession(websiteId: string, sessionId: string): Promis
|
||||
return session;
|
||||
}
|
||||
|
||||
export async function fetchAccount(websiteId: string) {
|
||||
let account = null;
|
||||
|
||||
const cache = await redis.client.get(`cache:website:${websiteId}`);
|
||||
|
||||
if (cache) {
|
||||
account = await redis.client.get(`account:${cache.account_id}`);
|
||||
}
|
||||
export async function fetchAccount(userId: string) {
|
||||
const account = await redis.client.get(`account:${userId}`);
|
||||
|
||||
return account;
|
||||
}
|
||||
Reference in new issue
Block a user