Refactor workspace cache service (#16208)
## Context We've recently introduced a new workspace cache service which now acts as a cache access and local storage for all workspace related data, deprecating the individual specific services. - Better performance through multiple caching/fetching strategies - Consistent data access patterns across the codebase - Reduced redis queries through MGET/MSET/PIPELINE with multiple cache keys
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
import {
|
||||
type WorkspaceCacheDataMap,
|
||||
type WorkspaceCacheKeyName,
|
||||
} from 'src/engine/workspace-cache/types/workspace-cache-key.type';
|
||||
|
||||
type WorkspaceCacheDataType = WorkspaceCacheDataMap[WorkspaceCacheKeyName];
|
||||
|
||||
@Injectable()
|
||||
export abstract class WorkspaceCacheProvider<
|
||||
T extends WorkspaceCacheDataType = WorkspaceCacheDataType,
|
||||
> {
|
||||
abstract computeForCache(workspaceId: string): Promise<T>;
|
||||
}
|
||||
Reference in New Issue
Block a user