Skip to content

Commit 26bc947

Browse files
committed
Remove unused auth cache exports
1 parent 0208455 commit 26bc947

File tree

4 files changed

+3
-16
lines changed

4 files changed

+3
-16
lines changed

lib/auth/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import {
2424
import { findUserById } from "@/lib/auth/users";
2525
import type { AppSessionIdentity, AuthUser } from "@/types/db";
2626

27-
export type AuthSessionIdentity = {
27+
type AuthSessionIdentity = {
2828
id: string;
2929
isInternalAdmin: boolean;
3030
isSignupComplete: boolean;

lib/auth/user-cache.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -143,19 +143,6 @@ export async function syncCachedAuthUser(
143143
}
144144
}
145145

146-
export async function invalidateCachedAuthUser(userId: string) {
147-
try {
148-
const backend = await getCacheBackend();
149-
if (backend.provider === "disabled") {
150-
return;
151-
}
152-
153-
await backend.del(getAuthUserCacheKey(userId));
154-
} catch (error) {
155-
console.error("[auth] Failed to invalidate auth user cache entry.", error);
156-
}
157-
}
158-
159146
function getAuthUserCacheKey(userId: string) {
160147
return `${AUTH_USER_CACHE_KEY_PREFIX}:${userId}`;
161148
}

lib/cache/backend.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
type CacheProvider,
55
} from "@/lib/env";
66

7-
export type CacheSetOptions = {
7+
type CacheSetOptions = {
88
onlyIfAbsent?: boolean;
99
ttlSeconds?: number;
1010
};

lib/rate-limit/mutation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export type MutationRateLimitDecision = {
2626
resetAt: string;
2727
};
2828

29-
export type MutationRateLimitStore = {
29+
type MutationRateLimitStore = {
3030
provider: CacheProvider;
3131
incrementWindowCounter(input: {
3232
key: string;

0 commit comments

Comments
 (0)