---
schema_version: "1"
id: bbb2b1c10f6bd08a0f1638b4f2f62a638f54e3601086a1a05cf7d6a48c38ec84
title: 配置数据缓存
collection: tableau
version: next
locale: zh-cn
portal_url: https://docs.salesforce.com/tableau/next/zh-cn/server/config_cache.md
canonical_url: https://help.tableau.com/v0.0/server/zh-cn/config_cache.htm
source_site: help.tableau.com
content_type: documentation
content_hash: 7cf17881e0e93e83c23a15390d804d36b484061359d6327c12cf7d6bc2cf8f43
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/v0.0/server/zh-cn/cli_data-access.htm#caching-set)` 命令通过配置缓存选项来更改此行为。

1. 运行此命令：
    
    `tsm data-access caching set -r <value>`
    
    其中 <value> 是以下选项之一：
    
    - **low 或空字符串 (" )**。这是默认值，指明 Tableau Server 应配置缓存，并在可用时始终使用缓存数据。
    - <value>。“<value>”指定应将数据缓存的最长分钟数。
    - **Always** 或 **0**（零）。这些值指明 Tableau Server 应始终获取最新数据，并在每次重新加载页面时应刷新缓存。
2. 使用 `tsm pending-changes apply` 命令来应用更改。此命令将重新启动 Tableau Server。