> ## Documentation Index
> Fetch the complete documentation index at: https://dragonwingdocs.qualcomm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 设置共享 Yocto 缓存

默认情况下，BitBake 会在构建目录内创建 sstate-cache 和 downloads 目录。为了加快构建速度并在多个工作区之间重用先前获取的源代码和构建产物，您可以为这些目录配置共享位置。

* 在运行构建命令之前，在您的 shell 中导出 `SSTATE_DIR` 和 `DL_DIR` 变量。

```bash theme={null}
export DL_DIR="/path/to/shared/downloads"
export SSTATE_DIR="/path/to/shared/sstate"
```
