Skip to content

Commit d33af3c

Browse files
committed
Revert "remove dependency on memory queue from kv cache"
This reverts commit 42739ae.
1 parent 42739ae commit d33af3c

File tree

3 files changed

+27
-11
lines changed

3 files changed

+27
-11
lines changed

packages/cloudflare/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"dependencies": {
7474
"@ast-grep/napi": "^0.34.1",
7575
"@dotenvx/dotenvx": "catalog:",
76-
"@opennextjs/aws": "https://pkg.pr.new/@opennextjs/aws@734",
76+
"@opennextjs/aws": "https://pkg.pr.new/@opennextjs/aws@731",
7777
"enquirer": "^2.4.1",
7878
"glob": "catalog:",
7979
"yaml": "^2.7.0"

packages/cloudflare/src/api/kv-cache.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type { CacheValue, IncrementalCache, WithLastModified } from "@opennextjs
22
import { IgnorableError, RecoverableError } from "@opennextjs/aws/utils/error.js";
33

44
import { getCloudflareContext } from "./cloudflare-context.js";
5+
import memoryQueue from "./memory-queue.js";
56

67
export const CACHE_ASSET_DIR = "cdn-cgi/_next_cache";
78

@@ -116,6 +117,8 @@ class Cache implements IncrementalCache {
116117
);
117118
} catch {
118119
throw new RecoverableError(`Failed to set cache [${key}]`);
120+
} finally {
121+
memoryQueue.remove(key);
119122
}
120123
}
121124

pnpm-lock.yaml

Lines changed: 23 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)