Skip to content

Commit 3f3f31f

Browse files
committed
TASK: add readme section for configEpoch
1 parent 1f0cf92 commit 3f3f31f

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,39 @@ and what data to delete if a release is removed.
365365
// ActionController
366366
$this->addFlashMessage('sth important you have to say');
367367
```
368+
369+
### Using different sets of config
370+
371+
In some cases it might be necessary to make fundamental adjustments to some configuration properties that would be
372+
really hard to handle (safely, non-breaking) on the consuming site of the content store. Therefore we added the config
373+
property `configEpoch` that can contain a current and previous config version. The `current` value (that should be used
374+
on the consuming site) gets published to the content store.
375+
376+
We decided to save the configEpoch on content store level instead of content release level for simplicity reasons on the
377+
consuming site. If you need to switch back to an older release that was rendered with the previous config epoch version
378+
and would not match the currently published one, you may manually toggle between current and previous config epoch.
379+
There is a button for this in the backend module for each target content store. Obviously this button should be used
380+
with extra care as the config epoch needs to fit the current release at all times.
381+
382+
Example:
383+
384+
- We need to make a bigger change to the contentDimensions config, let's say we need to add uriPrefixes that weren't
385+
there before. We adjust the config accordingly and in the same deployment we configure the config epoch as follows:
386+
387+
```yml
388+
Flowpack:
389+
DecoupledContentStore:
390+
configEpoch:
391+
current: v2
392+
previous: v1
393+
```
394+
395+
- Now on the consuming site we can take action to handle both the old and new config and decide based on the value in
396+
redis which case is executed.
397+
398+
```php
399+
'contentStoreUrl' => 'https://www.vendor.de/' . ($configEpoch === 'v2' ? 'de-de/' : '')
400+
```
368401

369402
## Development
370403

0 commit comments

Comments
 (0)