Skip to content

Commit ee090b7

Browse files
committed
chore: reduce strict caching
Signed-off-by: Okiki <[email protected]>
1 parent 87299e5 commit ee090b7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/edge/mod.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,10 +323,11 @@ export default {
323323
const JSONResult = JSONResultString ? JSON5.parse<BundleResult>(JSONResultString) : null;
324324

325325
const [moduleName] = modules[0];
326-
const PackageResultString = await redis.get<string>(getPackageResultKey(moduleName));
326+
const PackageResultKey = getPackageResultKey(moduleName) + "/" + jsonKey;
327+
const PackageResultString = await redis.get<string>(PackageResultKey);
327328
const PackageResult = PackageResultString ? JSON5.parse<BundleResult>(PackageResultString) : null;
328329

329-
await redis.del(jsonKey, badgeKey, getPackageResultKey(moduleName));
330+
await redis.del(jsonKey, badgeKey, PackageResultKey);
330331
console.log(`Deleting "${getPackageResultKey(moduleName)}" and ${jsonKey}\n`)
331332

332333
if (JSONResult && JSONResult.fileId) {
@@ -427,7 +428,8 @@ export default {
427428
if (modules.length === 1 && exportAll && !(shareQuery || textQuery)) {
428429
const [moduleName, mode] = modules[0];
429430
if (mode === "export") {
430-
await redis.set(getPackageResultKey(moduleName), JSON5.stringify(value));
431+
const PackageResultKey = getPackageResultKey(moduleName) + "/" + jsonKey;
432+
await redis.set(PackageResultKey, JSON5.stringify(value));
431433
}
432434
}
433435

0 commit comments

Comments
 (0)