HTTP Memory Cache
Syntax
%%{init: {
'theme': 'base',
'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
'themeVariables': {
'fontSize': '11px',
'fontFamily': 'Arial'
}
}}%%
flowchart LR
stmt_start((START))
stmt_start --> stmt_0_0[HTTP_MEMORY_CACHE]:::quoted
stmt_0_0 --> stmt_0_1["("]:::quoted
stmt_0_1 --> stmt_0_2[booleanConstant]
stmt_0_2 --> stmt_0_7
stmt_0_2 --> stmt_0_3[","]:::quoted
stmt_0_3 --> stmt_0_4[booleanConstant]
stmt_0_4 --> stmt_0_7
stmt_0_4 --> stmt_0_5[","]:::quoted
stmt_0_5 --> stmt_0_6[intervalConstant]
stmt_0_6 --> stmt_0_7[")"]:::quoted
stmt_0_7 --> stmt_end((END))
Purpose
The http_memory_cache-hint specifies whether messages may be cached in memory when the provider uses HTTP to exchange data with the backing platform. This typically holds only for cloud-based platforms such as Exact Online, Teamleader or Salesforce. The default setting varies depending on the execution environment.
The first parameter is a boolean whether data may be taken from the memory cache, the second parameter is a boolean whether data retrieved must be stored also in the memory cache and the third parameter is an interval that specifies the timespan before a memory cache hit found is to considered stale, such as "interval '30 seconds'".
The use of the http_memory-cache-hint is recommended for data which is known to change seldom such as seeded or reference data. The contents in the memory cache are forgotten across Invantive UniversalSQL sessions.
Examples
To disable the use of the HTTP memory cache for the query on the Contacts table:
select /*+ http_memory_cache(false) */ *
from Contacts
where email = 'john.doe@acme.eu'
limit 10
To use the contents of the HTTP memory cache for the query on the Contacts table, when not older than 30 minutes, and also store the results in the memory cache:
select /*+ http_memory_cache(true, true, interval '30 minutes') */ *
from Contacts
where email = 'john.doe@acme.eu'
limit 10