From 465aa3292a73d03a85a623984427bff4c8bd9232 Mon Sep 17 00:00:00 2001 From: ccbikai Date: Mon, 23 Dec 2024 21:09:00 +0800 Subject: [PATCH] fix: Increases KV list limit for better data retrieval Expands the limit of the KV.list call from 1 to 1000. This enhancement allows for more efficient data retrieval, reducing the number of requests needed to fetch all relevant entries. Improves performance in scenarios with a large number of links. --- server/api/link/search.get.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/api/link/search.get.ts b/server/api/link/search.get.ts index 83694ae..10d8f89 100644 --- a/server/api/link/search.get.ts +++ b/server/api/link/search.get.ts @@ -14,7 +14,7 @@ export default eventHandler(async (event) => { while (true) { const { keys, list_complete, cursor } = await KV.list({ prefix: `link:`, - limit: 1, + limit: 1000, cursor: finalCursor, })