mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-08 19:29:02 +08:00
Update cache.ts
This commit is contained in:
parent
87757d9b8e
commit
05e845a971
@ -3,6 +3,10 @@ import { Meta } from "..";
|
|||||||
import { CacheEntry, cacheKey, saveEntryToCache } from "../../../lib/cache";
|
import { CacheEntry, cacheKey, saveEntryToCache } from "../../../lib/cache";
|
||||||
|
|
||||||
export function saveToCache(meta: Meta, document: Document): Document {
|
export function saveToCache(meta: Meta, document: Document): Document {
|
||||||
|
if (meta.internalOptions.useCache !== true) {
|
||||||
|
return document;
|
||||||
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
document.metadata.statusCode! < 200 ||
|
document.metadata.statusCode! < 200 ||
|
||||||
document.metadata.statusCode! >= 300
|
document.metadata.statusCode! >= 300
|
||||||
|
Loading…
x
Reference in New Issue
Block a user