Review a cache backend migration

src/project-cache-types.tsTypeScript
@@ -0,0 +1,29 @@
1+export interface Project {
2+ id: string;
3+ tenantId: string;
4+ name: string;
5+}
6+
7+export type CachedProject = Project | null;
8+
9+export interface ProjectCache {
10+ get(tenantId: string, projectId: string): Promise<CachedProject | undefined>;
11+ set(
12+ tenantId: string,
13+ projectId: string,
14+ value: CachedProject,
15+ ttlMilliseconds: number,
16+ ): Promise<void>;
17+ delete(tenantId: string, projectId: string): Promise<void>;
18+}
19+
20+export interface SharedCacheClient {
21+ get(key: string): Promise<string | null>;
22+ setEx(key: string, ttlSeconds: number, value: string): Promise<void>;
23+ delete(key: string): Promise<void>;
24+}
25+
26+export interface ProjectRepository {
27+ find(tenantId: string, projectId: string): Promise<Project | null>;
28+ updateName(tenantId: string, projectId: string, name: string): Promise<Project>;
29+}