Load from cache shape
Introduction
The load from cache shape is used to retrieve a stored payload from an existing cache key (created from an add to cache shape).
You might configure a load from cache shape in the same process flow as the original add to cache step or - if a cache was added and set to company level - you might choose to load it in a different process flow.
Adding & configuring a load from cache shape to a process flow
To add a load from cache shape to a process flow, follow the steps below.
Step 1 Find the point in your process flow where you want to load the payload from a cache - this could be at the very start of a process flow, or perhaps somewhere further down.
Step 2 Select the load from cache shape from the shapes palette:
![](https://doc.wearepatchworks.com/~gitbook/image?url=https%3A%2F%2F2440044887-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FLYNcUBVQwSkOMG6KjZfz%252Fuploads%252Fo1DWOfgKm0Yt7E3Vub9e%252Fload%2520from%2520cache%25201.png%3Falt%3Dmedia%26token%3D8dda76db-e027-4dbd-b776-47da1a794842&width=768&dpr=4&quality=100&sign=2afff703&sv=1)
Step 3 Click in the select cache field and choose which cache you want to retrieve:
![](https://doc.wearepatchworks.com/~gitbook/image?url=https%3A%2F%2F2440044887-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FLYNcUBVQwSkOMG6KjZfz%252Fuploads%252Fyk9hO5i2MBwgfjMgg8nH%252Fload%2520from%2520cache%25201.png%3Falt%3Dmedia%26token%3D71e7e847-e8b4-4ca1-8f31-a649e2bdf5f9&width=768&dpr=4&quality=100&sign=7aec4cc4&sv=1)
In this list, you'll find any caches that have been added to this process flow (via the add to cache shape), together with any caches that have been added to other process flows and set to a cache level of company.
Step 4 Enter the cache key that you want to retrieve - for example:
![](https://doc.wearepatchworks.com/~gitbook/image?url=https%3A%2F%2F2440044887-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FLYNcUBVQwSkOMG6KjZfz%252Fuploads%252F8BRMohQwOf5Pcphttpoz%252Fload%2520from%2520cache%25202.png%3Falt%3Dmedia%26token%3Dbfb0f5a1-71e2-4bd8-8583-173772a68930&width=768&dpr=4&quality=100&sign=4597361a&sv=1)
Your given cache key might be static or dynamic, depending on how the cache was configured in the corresponding add to cache shape:
Cache key | Summary | Example |
---|---|---|
Static | Data is cached to the key exactly as it is specified. Typically used when your aim it to load the entire cache later in the flow (or in other flows). |
|
Dynamic | The cache key resolves dynamically based on a payload variable. Typically used when your aim it to load single or multiple items from the cache later in the flow (or in other flows). For more information please see our Generating dynamic cache keys with payload variables. |
|
For detailed information about each of these approaches, please see What cached data do you want to load?
The cache key must be associated with an existing add to cache shape, either in the same process flow or (in the case of company-level caches) in another process flow.
Step 5 If you want this process flow to fail if for any reason this cache can't be retrieved, tick the fail on cache miss option:
![](https://doc.wearepatchworks.com/~gitbook/image?url=https%3A%2F%2F2440044887-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FLYNcUBVQwSkOMG6KjZfz%252Fuploads%252FrP9Ull4wm8sU4q9tOLlk%252Fload%2520from%2520cache%25203.png%3Falt%3Dmedia%26token%3Dcef1c8fb-06a4-4a9b-84fe-ba91699fdbb7&width=768&dpr=4&quality=100&sign=d0ea2b0b&sv=1)
If you leave this option un-ticked, the process flow will continue to run if the cache can't be loaded.
Step 6 If the cache that you're loading was created with the save all pages option toggled ON, you should toggle the load all pages option ON when loading this data:
![](https://doc.wearepatchworks.com/~gitbook/image?url=https%3A%2F%2F2440044887-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FLYNcUBVQwSkOMG6KjZfz%252Fuploads%252FfCfvMVdy9aEpPyVigaHH%252Fload%2520from%2520cache%25204.png%3Falt%3Dmedia%26token%3D5bfd1469-4fae-4947-8487-a472df50dcce&width=768&dpr=4&quality=100&sign=99632fce&sv=1)
When paginated data is pulled from a connection shape, a payload is created for each page. If the save all pages option is toggled ON when a cache is created, the payload for each page is saved to its own cache key (with key names generated dynamically from a specified key and page numbers). If the save all pages option is toggled OFF, all pages are saved to a single cache key. For more information please see our Cache pagination options.
Step 7 Save changes. The load from cache shape is added to your process flow, displaying the given name and key - for example:
![](https://doc.wearepatchworks.com/~gitbook/image?url=https%3A%2F%2F2440044887-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FLYNcUBVQwSkOMG6KjZfz%252Fuploads%252F9MbdswNxJvqTKfB2Ke40%252Fload%2520from%2520cache%25205.png%3Falt%3Dmedia%26token%3D7d3ca848-5329-4b41-8bf0-b28d181b1a6e&width=768&dpr=4&quality=100&sign=1c544750&sv=1)
Can I see the data associated with a load from cache shape?
Yes. As with any other process flow shape, you can view the associated payload for a load from cache shape after the process flow has run. To do this, click the shape's tick icon and then select the payload tab in the run log panel - for example:
![](https://doc.wearepatchworks.com/~gitbook/image?url=https%3A%2F%2F2440044887-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FLYNcUBVQwSkOMG6KjZfz%252Fuploads%252FaYYZcTbIxE22vNFEJuXa%252Fload%2520from%2520cache%2520e.png%3Falt%3Dmedia%26token%3Dd491b208-6bcd-42bf-a452-98c2e96adbb5&width=768&dpr=4&quality=100&sign=4604ce0f&sv=1)
Last updated