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.
This commit is contained in:
ccbikai 2024-12-23 21:09:00 +08:00
parent 45745f1d8f
commit 465aa3292a

View file

@ -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,
})