We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a6a63d commit 64397bbCopy full SHA for 64397bb
src/core/card.ts
@@ -15,6 +15,7 @@ export class Generator {
15
};
16
public cache: Cache;
17
public headers: Record<string, string>;
18
+ public count = 0;
19
20
constructor(cache: Cache, headers?: Record<string, string>) {
21
this.cache = cache;
@@ -54,7 +55,9 @@ export class Generator {
54
55
): Promise<FetchedData> {
56
this.log("fetching", username, site);
57
const cache_key = `data-${username.toLowerCase()}-${site}`;
58
+ console.log("cache_key", cache_key);
59
60
+ await new Promise((resolve) => setTimeout(resolve, 200 * (this.count++ % 5)));
61
const cached: FetchedData | null = await this.cache.get(cache_key);
62
if (cached) {
63
this.log("fetch cache hit");
0 commit comments