# DB Cache 伺服器和用戶端

ProudNet DB系統的DB快取是一個用於讀取/寫入遊戲資料庫的子系統，資料庫內容快取在伺服器記憶體中，減少DBMS的負載。

遊戲服務器或認證服務器等其他服務器必須擁有DB cache client，DB cache client連接DB cache server，主要通過<mark style="color:orange;">stored procedure</mark>間接訪問遊戲DBMS。

<figure><img src="/files/GdO6Ve4Cm45wfYKITXoN" alt=""><figcaption><p>ProudDB cache 服務器和客戶端配置圖</p></figcaption></figure>

## DB Cache 伺服器

DB快取伺服器是唯一直接存取遊戲DBMS的進程。 這是因為 DB 快取的最新內容可能尚未反映在遊戲 DBMS 中。&#x20;

DB cache正在訪問的遊戲DBMS內容如果想在其他地方也進行變更，請使用[**存取非專有數據**](/proudnet.cn/proudnet/db_system/db_cache_ver2/theory.md#id-3)。

## DB cache 用戶端

DB cache client加載遊戲DBMS的對象信息。 而且該信息在DB cache client中無需DBMS的負荷，完全可以讀取。\
如果將DB cache client加載的信息修改爲[**單方面更改數據**](/proudnet.cn/proudnet/db_system/db_cache_ver2/theory.md#id-1)，其內容將發送到DB cache server。\
DB cache系統一旦接到DB cache client的修改請求,就不會立即寫入DBMS,而是在DB cache server的內存中更新值。 當某一時間段或關鍵時間點（服務器用戶定義的）到來時，記錄在DBMS中。


---

# Agent Instructions: 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:

```
GET https://docs.proudnet.com/proudnet.cn/proudnet/db_system/db_cache_ver2/server_client.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
