---
schema_version: "1"
id: d8a400f322fb4eb68ebee214de195ee2f0f3955ef57893603f1e4c8f453e1a10
title: 配置数据缓存
collection: tableau
version: current
locale: zh-cn
portal_url: https://docs.salesforce.com/tableau/current/zh-cn/server-linux/config_cache.md
canonical_url: https://help.tableau.com/current/server-linux/zh-cn/config_cache.htm
source_site: help.tableau.com
content_type: documentation
content_hash: f40fefc7d42a78c57b61bfd79d7889f2da9ef358c6d34af2236887758062b2ed
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-linux/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。