Skip to content

Commit c0ca9b2

Browse files
committed
add refreshTime in caching datasets
1 parent 2cb930f commit c0ca9b2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

packages/doc/docs/develop/cache.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,18 @@ cache:
6363

6464
In this configuration, the `cache_departments` table will be utilized within the `{% cache %}` tag.
6565

66+
Also, you can add the refresh interval configuration in the yaml file in the cache section using the `refreshTime` keyword.
67+
68+
```yaml
69+
cache:
70+
- cacheTableName: 'cache_departments' # The name of the table in the cache layer storage
71+
...
72+
refreshTime: { every: '5m' }
73+
```
74+
75+
:::info
76+
The time format used in `refreshTime` should be compliant with the [`ms`](https://www.npmjs.com/package/ms) package.
77+
:::
6678

6779
## Reusing Cached Results
6880
VulcanSQL provides the ability to keep the query result from the cache layer in a variable, which can be reused in subsequent queries. For example:

0 commit comments

Comments
 (0)