Result caching of data from a source for a Cloud-based requester. The source could be on-premises or Cloud based.

Pattern Definition
Problem | How do I cache a result from an on-premise source or another public cloudto make subsequent requests return results faster? |
Context | This pattern is applicable when the response requires considerable time or compute resources to create, for example a report. It is also applicable if the source for the response has limited throughput or is difficult to scale to support new initiatives e.g. mobile, multi-cloud. This pattern is also applicable if the response is a large data set. The source could be on-premises or in another Cloud. This pattern does not include on-premises caching. |
Forces |
|
Solution | The result returned from a source is cached in the Cloud to service subsequent requests for the same data. This reduces the response times for the Cloud-based requestors and reduces the load on the source, whether on-premises or in another Cloud. The data can be cached in memory or on disk. |
Consequences | Pros:
|
Interaction Views
Result Caching
A Requestor requires data from an on-premises and/or cloud source. The data may be large or time consuming to compute.

Interactions
Interaction initiated by the Cloud-based requestor:
- The requestor initiates the data request via the application integration platform.
- The application integration platform communicates with the data source. This can be on-premise or in the cloud or both.
- The application integration platform posts the result message to the Data Cache with a time-to-live value.
- Another request for the data is received.
- If the request is for the same data and within the time-to-live window, the application integration platform retrieves the data from the Data Cache. Otherwise, the application integration platform will fetch the data from the on-premises/cloud source.
Notes
- The application integration platform could also use the Data Cache component to cache results from multiple public Cloud sources.
Grid Result Caching
A Requestor requires data from an on-premises and/or cloud source. The data may be large or time consuming to compute.

Interactions
Interaction initiated by the Cloud-based requestor:
- The requestor initiates the data request via the application integration platform.
- The application integration platform gets the data from an on-premises source and/or cloud source.
- The application integration platform posts the result message to the caching platform with a time-to-live value.
- Another request for the data is received.
- If the request is for the same data and within the time-to-live window, the application integration platform retrieves the data from the caching platform. Otherwise, the application integration platform will need to fetch the data from the on-premises and/or cloud source.
Notes
- The application integration platform could also use the caching platform to cache results from multiple Clouds.
File Caching
A Requestor requires data from an on-premises and/or cloud source. The result is a large file.

Interactions
Interaction initiated by the Cloud-based requestor:
- The Requestor initiates the data request via the application integration platform.
- The application integration platform gets the data from an on-premises and/or cloud source.
- The application integration platform posts the result message to the Object Storage with a time-to-live value. A URL to the file is returned to the original requestor.
- Another request for the data is received.
- If the request is for the same data and within the time-to-live window, the application integration platform returns the URL to the data from the Object Storage. Otherwise, the application integration platform will need to fetch the data from the on-premises and/or cloud source.
Notes
- The application integration platform could also use the Object Storage to cache results from multiple Cloud sources.