-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add document about how to clean cache
- Loading branch information
1 parent
3c4df73
commit a90c0dd
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,3 +58,15 @@ SMTP_SENDER="\"Tailchat\" [email protected]" # If there are repeated double quotes | |
:::caution | ||
Some environment variable modifications may need to clear the cache to take effect | ||
::: | ||
|
||
### How to clear the cache | ||
|
||
Changes to some environment variables may involve cache updates, such as `FILE_LIMIT`, because config data needs to be sent to the client. | ||
|
||
Therefore, it may appear that after modifying the environment variable, the performance on the client is still the same as before. At this point you need to clear the old cache for the update to take effect. | ||
|
||
There are several options for clearing the cache: | ||
|
||
- Execute `docker compose down` then run `docker compose up -d`. This is because the data of the `redis` service is not persisted, shutting down and restarting the service is equivalent to a brand new environment | ||
- Manually enter the `redis` service to clean up the cache items whose name contains `config.client`, which contains the configuration items returned to the client | ||
- Enter the cache management page of the `admin` management system. Click the `Clean Configuration Cache` button |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,3 +58,15 @@ SMTP_SENDER="\"Tailchat\" [email protected]" # 如果有重复的双引号需要 | |
:::caution | ||
部分环境变量修改可能需要清理缓存后才能生效 | ||
::: | ||
|
||
### 如何清理缓存 | ||
|
||
一些环境变量的改动可能涉及到缓存的更新,如 `FILE_LIMIT`, 因为配置信息是需要发送到客户端的。 | ||
|
||
因此可能会出现修改环境变量后在客户端上的表现还是和以前一样的情况。这时候你需要清空旧的缓存来让更新生效。 | ||
|
||
以下有几种方案可以清理缓存: | ||
|
||
- `docker compose down` 后执行 `docker compose up -d`. 这是因为 `redis` 服务的数据并没有被持久化,把服务关了再重启相当于一个全新的环境 | ||
- 手动进入 `redis` 服务清理名称包含 `config.client` 的缓存项,这里面包含了返回给客户端的配置项 | ||
- 进入 `admin` 管理后台的缓存管理页面。点击`清理配置缓存`按钮 |