Skip to content

Commit 105d851

Browse files
committed
feat: change comment
1 parent 5d1eb58 commit 105d851

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/pages/products.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const { Content } = await productsPost.render();
7777
}
7878
localStorage.setItem(
7979
`git-${repo}`,
80-
JSON.stringify({ data, expire: nowSeconds() + 24 * 60 * 60 })
80+
JSON.stringify({ data, expire: nowSeconds() + 4 * 60 * 60 })
8181
);
8282
repoCache.data(data, uuid);
8383
});

src/plugins/rehype-component-github-card.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ export function GithubCardComponent(properties, children) {
5454
const nForks = h(`div#${cardUuid}-forks`, { class: 'gc-forks' }, '0K')
5555
const nLicense = h(`div#${cardUuid}-license`, { class: 'gc-license' }, '0K')
5656

57+
// 未经身份验证的请求的主要速率限制为每小时 60 个请求。
58+
// 所以在这里添加 4 个小时的缓存,避免重复请求
5759
const nScript = h(
5860
`script#${cardUuid}-script`,
5961
{ type: 'text/javascript', defer: true },

0 commit comments

Comments
 (0)