Embeddable uses Cube’s built-in caching (official docs here).

Refresh contexts tell Embeddable which pre_aggregations to keep warm.

// for security reasons, this must *never* be called from your client-side
fetch('<https://api.embeddable.com/api/v1/caching/refresh-contexts>', {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json',
        'Accept': 'application/json',
        'Authorization': `Bearer ${apiKey}` /* keep your API Key secure */
    },
    body: JSON.stringify({
		    refreshInterval: "30 minutes",
				scheduledRefreshContexts: [
					{
						securityContext: {
							userId: '9sZSJ9LHsiYXR0cmli',
	            regions: ['us-east', 'eu-west']
						},
						timezones: ['UTC', 'Europe/London'],
						environment: 'default'
					},
					{
						securityContext: {
							userId: 'dXRlIjoiZ2VvaXBf',
	            regions: ['us-west']
						},
						timezones: ['UTC', 'America/New_York'],
						environment: 'dev'
					},
					// ...
				]
    })
});

Response:
Status 204 (No Content)

Note: if you are connecting to a Redshift database, please contact us to discuss setting up pre-aggregations.