Replacement caches

Introduction

Having chosen to configure cache replacements for a virtual environment, a new replacement rule is displayed, ready for you to configure:

Having defined the first rule, you can add more - you must create one replacement rule for every cache that you need to replace in every process flow that will run in this environment.

Need to know

Please consider the cache type used when replacing caches in master process flows.

Cache type
Can be replaced in VE config?
Can be used in master process flows?
Cache key notes

Company

Yes

Yes

Keep in mind that whilst a company cache can be replaced, the cache key cannot. As such, you should ensure that the given cache key in your master process flow utilises variables to ensure that it's unique at runtime - please see Referencing variables for unique cache keys, below.

Flow

No

Yes

Although flow caches cannot be configured as virtual environment replacements (currently), you can still include them in a master process flow.

It's important to ensure that the given cache key in your master process flow utilises variables to ensure that it's unique at runtime - please see Referencing variables for unique cache keys, below.

Flow run

No

Yes

Behind the scenes, each cache key for a flow run cache is appended with a unique flow run id - although you never see this in the dashboard, it does mean that these caches will never clash between virtual environments. However, if required, you can reference an environment variable in the cache key name, so the cache key is immediately identifiable for each virtual environment. Please see Referencing variables for unique cache keys, below.

For more information on the different cache types, please refer to our Add to cache documentation.

Defining replacement rules for a cache

1

Select the required ORIGINAL cache

Use the original dropdown list to select the first company cache in a 'master' process flow that must be replaced when this process flow runs in the given virtual environment - for example:

As you work through your replacement configuration, it's helpful to view related 'master' process flows in another browser tab. You can duplicate a Patchworks browser tab and navigate to a different page whenever needed.

2

Select the required REPLACEMENT cache

Use the replacement dropdown list to select the replacement cache that must be used when this process flow runs in the given virtual environment - for example:

3

Confirm your selections

Click the create button (associated with this replacement rule) to confirm your selections:

The rule is added:

Once a rule is confirmed, it can't be edited. If you need to change a replacement rule, use the 'trash' icon to remove it and add a new one.

4

Add more replacement rules for caches

To add another replacement rule for a cache, click the top-right create button:

Update the new rule as required, then click the associated create button to confirm your selections:

Repeat as many times as needed to define all required cache replacements for all process flows that will be running in this virtual environment.

If you don't want to define ALL cache replacements now, that's OK. For example, you might choose to add the minimum number of replacements needed for testing, then define remaining rules (in a new draft) later, after initial testing is complete.

Last updated