Skip to content

Commit bf86583

Browse files
authored
docs(core): update guide for cache-debugging (#1028)
1 parent d3c5214 commit bf86583

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

apps/site/docs/en/caching.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,8 @@ Midscene uses [XPath](https://developer.mozilla.org/en-US/docs/Web/XML/XPath) to
105105
1. The text content of the new element at the same XPath is different from the cached element.
106106
2. The DOM structure of the page is changed from the cached one.
107107

108-
When the cache is not hit, the process will fall back to continue using AI services to find the element.
108+
When the cache is not hit, the process will fall back to continue using AI services to find the element.
109+
110+
### Get more debug logs for caching
111+
112+
You can set the `DEBUG=midscene:cache:*` environment variable to get more debug logs for caching.

apps/site/docs/zh/caching.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,8 @@ Midscene 使用 [XPath](https://developer.mozilla.org/en-US/docs/Web/XML/XPath)
107107
1. 新元素在相同的 XPath 下的文本内容与缓存元素不同。
108108
2. 页面的 DOM 结构与缓存时的结构不同。
109109

110-
当缓存未命中时,Midscene 将回退到继续使用 AI 服务来查找元素。
110+
当缓存未命中时,Midscene 将回退到继续使用 AI 服务来查找元素。
111+
112+
### 获取缓存相关的调试日志
113+
114+
在环境变量中配置 `DEBUG=midscene:cache:*`,你可以看到缓存相关的调试日志。

0 commit comments

Comments
 (0)