---
title: 如何修改 OMS Store 组件的缓存时间-OceanBase数据库使用指南
description: 了解OceanBase数据库在实际应用中关于 如何修改 OMS Store 组件的缓存时间相关的常见问题和使用技巧，帮助您快速解决 如何修改 OMS Store 组件的缓存时间的难题。
image: https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*OSPzQ6GUQF4AAAAAQHAAAAgAeiGDAQ/original
---
[OceanBase AI 数据大会](https://www.oceanbase.com/conference2026 "OceanBase AI 数据大会")

## 体验新一代 AI 数据平台

[立即咨询](https://www.oceanbase.com/contactus) [免费试用 免费试用](https://www.oceanbase.com/free-trial)划线反馈

# 如何修改 OMS Store 组件的缓存时间

更新时间：2023-12-19 09:16

适用版本： V1.4.x 内容类型：TechNote  

本文为您介绍 OceanBase 迁移服务（OceanBase Migration Service，OMS）Store 组件缓存时间的修改方法和修改示例。

## 适用版本

仅适用于 OMS V1.4.x。

## 适用场景

在 OMS 增量同步中，Oracle Store 增量数据默认缓存 10 天，OceanBase Store 增量数据默认缓存 1 天。考虑到存储空间及容错等因素，需要调整 Store 增量数据默认缓存时间。

## 修改方法

Store 缓存保留时间需要在 Topic 级别修改，修改后的缓存保留时间对于新建的 Store 生效。示例如下：

```shell
curl http://xxx.xxx.xxx.xxx:8088/topic/update -d 'topic=$topic&store.clearer.outdated=1296000'

```

其中需要修改的参数为 `update`，`xxx.xxx.xxx.xxx` 为组件启动时所在机器的 IP，请根据实际情况替换 IP 值。修改后新启动一个 Store，修改的缓存保留时间对该 Store 生效。

- 启动 OceanBase Store。

  ```shell
  curl http://xxx.xxx.xxx.xxx:8088/crawler/start -d "topic=${SUB_TOPIC_NAME}&checkpoint=::::1602687985:&role=master"

  ```
 - 启动 Oracle Store。

  启动 Oracle Store 时，需要多指定一个 `type` 参数。

  ```shell
  curl http://xxx.xxx.xxx.xxx:8088/crawler/start -d "topic=${SUB_TOPIC_NAME}&checkpoint=::::1602687985:&role=master&type=DELIVER2STORE"

  ```

## 修改示例

您可以通过修改 OceanBase 数据库 Topic 中的 update 参数，调整 OceanBase Store 的缓存保留时间。

```shell
curl http://xxx.xxx.xxx.xxx:8088/topic/update -d 'topic=oms_dest_topic_1000102_RATING-000-0&key=exCfg&value=store.clearer.outdated=864000'

```

修改完成后，启动一个新的 OceanBase Store，使修改后的 OceanBase Store 的缓存保留时间生效。

```shell
curl http://xxx.xxx.xxx.xxx:8088/crawler/start -d "topic=oms_dest_topic_1000102_RATING-000-0&checkpoint=::::1605087038:&role=master"

```

上一篇

[如何为 Oracle 至 OceanBase 数据库 Oracle 租户的数据迁移项目配置归档模式](https://www.oceanbase.com/knowledge-base/oceanbase-database-20000000105)

下一篇

[Oracle 至 OceanBase 数据库 Oracle 租户的增量迁移过程中，如何设置跳过目标端写入乱码报错](https://www.oceanbase.com/knowledge-base/oceanbase-database-20000000118) ![有帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*y6ocSqN8cqsAAAAAAAAAAAAAARQnAQ)![无帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*BG9IQJyLHF8AAAAAAAAAAAAAARQnAQ)![反馈](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*eTWdQKCRKHwAAAAAAAAAAAAAARQnAQ) 咨询
