> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/zh-cn/zhi-shi-ku/028-clearing-the-cache.md).

# 清除缓存

当你编译项目时，LaTeX 会生成许多辅助文件，这些文件按用户存储在“缓存”中，而不是与项目一起存放。这些生成的文件通常包括 **`.aux`**, **`.log`** 和 **`.toc`** 文件，它们用于交叉引用、生成参考文献和制作目录。LaTeX 生成的（辅助）文件不会列在你的项目中，也就是说不会显示出来，而是“隐藏在幕后”保留在缓存中，以便在你下次重新编译文档时按需重新生成。

如果你发现你的某位协作者能够无错误地编译你的项目，但你在自己电脑上编译时却出现错误，那么从头重新编译（也称为清除缓存）可能会有帮助。此外，如果你遇到与生成文件相关的错误信息，或者只是出于其他原因想删除这些生成文件，也可以考虑从头重新编译。

## 从头重新编译

该 **从头重新编译** 菜单操作会删除生成的文件并立即重新编译你的项目。通过打开“重新编译”菜单并点击“从头重新编译”即可找到此按钮。

![“重新编译”菜单截图](/files/98becd6ad002fa0ece9313a8fa9a0c1310707a93)

## 清除缓存文件

该 **清除缓存文件** 按钮会删除生成的文件，但不会立即重新编译你的项目。首先点击 **日志和输出** 文件按钮，然后点击底部红色的“清除缓存文件”按钮。

![“清除缓存文件”按钮截图](/files/44bb7a089b52d2e0fcb1f992a7fc930d463baa42)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/zh-cn/zhi-shi-ku/028-clearing-the-cache.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
