---
schema_version: "1"
id: dd558ddf6c5796e2de7405cb304edd8f12f41f4a125bd661ae96aca592f8c8c3
title: 設定資料快取
collection: tableau
version: current
locale: zh-tw
portal_url: https://docs.salesforce.com/tableau/current/zh-tw/server/config_cache.md
canonical_url: https://help.tableau.com/current/server/zh-tw/config_cache.htm
source_site: help.tableau.com
content_type: documentation
content_hash: 20a56c84007e6a007726959018f1a7f3c316d633f37c1d0a54657717ce451347
description: Configure the Tableau Server data cache to balance data freshness against performance.
---
[跳至主要內容](#main-content)

# 設定資料快取

發佈到 Tableau Server 的檢視是互動式的，有時具有與資料庫的即時連線。當使用者在 Web 瀏覽器中與這些檢視交互時，查詢的資料將存儲在快取中。隨後的存取將從此快取中取出資料（如果有資料）。預設情況下，Tableau Server 將盡可能長時間快取和重用資料。您可以使用 `[tsm data-access caching set](https://help.tableau.com/current/server/zh-tw/cli_data-access.htm#caching-set)` 命令透過設定快取選項來變更此行為。

1. 執行此命令：
    
    `tsm data-access caching set -r <value>`
    
    其中 <value> 是以下選項之一：
    
    - **低位字串或空白字串 (")**。此為預設值，指出 Tableau Server 應該設定快取，而且一律在可用時使用快取的資料。
    - <value>。「<value>」指定應快取資料的最大分鐘數。
    - **Always** 或 **0**（零）。這些值表示 Tableau Server 應一律取得最新資料，而且每次重新載入頁面時都應該重新整理快取。
2. 使用 `tsm pending-changes apply` 命令來應用變更。此命令將重新啟動 Tableau Server。