You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/guides/getting-started/configuration.mdx
+72-3Lines changed: 72 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -121,16 +121,85 @@ Stores user profiles and credentials.
121
121
122
122
## Cache Configuration
123
123
124
-
Thunder includes an in-memory caching layer to improve performance.
124
+
Thunder includes both in-memory and Redis-backed caching to improve performance.
125
125
126
126
| Setting | Default | Description |
127
127
|---------|---------|-------------|
128
128
|`cache.disabled`|`false`| If `true`, disables caching entirely |
129
-
|`cache.type`|`inmemory`| Cache type (currently only `inmemory`is supported)|
129
+
|`cache.type`|`inmemory`| Cache type (`inmemory` or `redis`). When `cache.type`is `redis`, Thunder does not use the periodic cleanup routine.|
130
130
|`cache.size`|`1000`| Maximum number of cache entries |
131
131
|`cache.ttl`|`3600`| Default time-to-live for cache entries in seconds |
132
132
|`cache.eviction_policy`|`LRU`| Cache eviction policy (`LRU` - Least Recently Used) |
133
-
|`cache.cleanup_interval`|`300`| Interval in seconds to clean up expired entries |
133
+
|`cache.cleanup_interval`|`300`| In-memory only. Interval in seconds to clean up expired entries. Not used when `cache.type` is `redis`. |
134
+
|`cache.properties[]`|`[]`| Per-cache overrides for `name`, `disabled`, `size`, `ttl`, and `eviction_policy`|
135
+
|`cache.redis.address`|`""`| Redis server address in `host:port` format |
136
+
|`cache.redis.username`|`""`| Redis username |
137
+
|`cache.redis.password`|`""`| Redis password |
138
+
|`cache.redis.db`|`0`| Redis database index |
139
+
|`cache.redis.key_prefix`|`thunder`| Prefix added to all Redis cache keys |
140
+
141
+
### Per-Cache Overrides with `cache.properties`
142
+
143
+
Use `cache.properties` when you want to override cache behavior for a specific internal cache instead of changing the global cache settings for all caches.
144
+
145
+
Each item in `cache.properties` supports these fields:
146
+
147
+
| Field | Required | Description |
148
+
|---------|---------|-------------|
149
+
|`name`| Yes | Internal cache name to override. The value must match the cache name exactly. |
150
+
|`disabled`| No | Disables only that cache when set to `true`. |
151
+
|`size`| No | Maximum number of entries for that cache. This setting applies to in-memory caches only. |
152
+
|`ttl`| No | Time-to-live for that cache in seconds. |
153
+
|`eviction_policy`| No | Eviction policy for that cache. Supported values are `LRU` and `LFU`. This setting applies to in-memory caches only. |
154
+
155
+
If you omit a field in a `cache.properties` entry, Thunder falls back to the corresponding global `cache.*` setting.
156
+
157
+
That means you can override only the fields you need. Thunder continues to use the global cache settings for any fields you leave unset.
158
+
159
+
Thunder currently uses cache names such as:
160
+
161
+
-`ApplicationByIDCache`
162
+
-`ApplicationByNameCache`
163
+
-`OAuthAppCache`
164
+
-`FlowByIDCache`
165
+
-`FlowByHandleCache`
166
+
-`CertificateByIDCache`
167
+
-`CertificateByReferenceCache`
168
+
-`UserSchemaByIDCache`
169
+
-`UserSchemaByNameCache`
170
+
-`FlowGraphCache`
171
+
172
+
:::note
173
+
`FlowGraphCache` is always in-memory. It caches process-local flow graph Go objects during flow execution, not shared system-level cache data.
174
+
:::
175
+
176
+
:::note
177
+
When `cache.type` is `redis`, per-cache `ttl` and `disabled` remain useful. Per-cache `size` and `eviction_policy` do not affect Redis behavior because Redis manages memory and eviction independently.
178
+
:::
179
+
180
+
### Redis Cache Configuration
181
+
182
+
Set `cache.type` to `redis` and configure `cache.redis.address` to enable Redis-backed cache storage.
183
+
184
+
```yaml
185
+
cache:
186
+
type: "redis"
187
+
ttl: 3600
188
+
redis:
189
+
address: "localhost:6379"
190
+
username: ""
191
+
password: ""
192
+
db: 0
193
+
key_prefix: "thunder"
194
+
```
195
+
196
+
:::note
197
+
When Redis caching is enabled, Thunder uses Redis native key expiry for TTL handling.
198
+
:::
199
+
200
+
:::warning
201
+
If Thunder cannot connect to Redis during startup, it disables the cache layer.
0 commit comments