We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fc1dfe3 + 6abd042 commit eba31a7Copy full SHA for eba31a7
api/src/utils/fs_cache.ts
@@ -31,13 +31,13 @@ export const clearFsCacheByContentId = (contentId: string) => {
31
};
32
33
export const putFsCache = async (contentId: string, key: string, data: any): Promise<void> => {
34
- fs.ensureDirSync(cacheDir);
+ fs.ensureDirSync(path.join(cacheDir, contentId));
35
const filename = `${key}.json`;
36
await fs.writeJSON(path.join(cacheDir, contentId, filename), data);
37
38
39
export const getFsCache = async (contentId: string, key: string): Promise<any> => {
40
41
const ttl = await getTTL();
42
43
try {
0 commit comments