Review a stale-while-revalidate profile cache

src/profile-cache-types.tsTypeScript
@@ -0,0 +1,17 @@
1+export interface UserProfile {
2+ userId: string;
3+ displayName: string;
4+ avatarUrl: string | null;
5+}
6+
7+export interface ProfileOrigin {
8+ fetch(tenantId: string, userId: string): Promise<UserProfile>;
9+}
10+
11+export interface ProfileCacheTelemetry {
12+ refreshFailed(tenantId: string, userId: string, error: unknown): void;
13+}
14+
15+export interface MonotonicClock {
16+ nowMilliseconds(): number;
17+}