summaryrefslogtreecommitdiff
path: root/packages/core/src/utils/filesearch/crawlCache.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/core/src/utils/filesearch/crawlCache.ts')
-rw-r--r--packages/core/src/utils/filesearch/crawlCache.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/core/src/utils/filesearch/crawlCache.ts b/packages/core/src/utils/filesearch/crawlCache.ts
index 3cc948c6..b905c9df 100644
--- a/packages/core/src/utils/filesearch/crawlCache.ts
+++ b/packages/core/src/utils/filesearch/crawlCache.ts
@@ -17,10 +17,14 @@ const cacheTimers = new Map<string, NodeJS.Timeout>();
export const getCacheKey = (
directory: string,
ignoreContent: string,
+ maxDepth?: number,
): string => {
const hash = crypto.createHash('sha256');
hash.update(directory);
hash.update(ignoreContent);
+ if (maxDepth !== undefined) {
+ hash.update(String(maxDepth));
+ }
return hash.digest('hex');
};