mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-14 06:55:57 +08:00
temp: disable acuc caching
This commit is contained in:
parent
a461f72d17
commit
f2865f6699
@ -80,14 +80,14 @@ export async function getACUC(
|
|||||||
): Promise<AuthCreditUsageChunk | null> {
|
): Promise<AuthCreditUsageChunk | null> {
|
||||||
const cacheKeyACUC = `acuc_${api_key}_${mode}`;
|
const cacheKeyACUC = `acuc_${api_key}_${mode}`;
|
||||||
|
|
||||||
if (useCache) {
|
// if (useCache) {
|
||||||
const cachedACUC = await getValue(cacheKeyACUC);
|
// const cachedACUC = await getValue(cacheKeyACUC);
|
||||||
if (cachedACUC !== null) {
|
// if (cachedACUC !== null) {
|
||||||
return JSON.parse(cachedACUC);
|
// return JSON.parse(cachedACUC);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (!cacheOnly) {
|
// if (!cacheOnly) {
|
||||||
let data;
|
let data;
|
||||||
let error;
|
let error;
|
||||||
let retries = 0;
|
let retries = 0;
|
||||||
@ -129,14 +129,14 @@ export async function getACUC(
|
|||||||
data.length === 0 ? null : data[0].team_id === null ? null : data[0];
|
data.length === 0 ? null : data[0].team_id === null ? null : data[0];
|
||||||
|
|
||||||
// NOTE: Should we cache null chunks? - mogery
|
// NOTE: Should we cache null chunks? - mogery
|
||||||
if (chunk !== null && useCache) {
|
// if (chunk !== null && useCache) {
|
||||||
setCachedACUC(api_key, chunk);
|
// setCachedACUC(api_key, chunk);
|
||||||
}
|
// }
|
||||||
|
|
||||||
return chunk ? { ...chunk, is_extract: isExtract } : null;
|
return chunk ? { ...chunk, is_extract: isExtract } : null;
|
||||||
} else {
|
// } else {
|
||||||
return null;
|
// return null;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function clearACUC(api_key: string): Promise<void> {
|
export async function clearACUC(api_key: string): Promise<void> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user