HTTPディスクキャッシュ
構文
%%{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_DISK_CACHE]
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))
目的
The http_disk_cache-hint specifies whether messages may be cached on disk 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 disk cache, the second parameter is a boolean whether data retrieved must be stored also in the disk cache and the third parameter is an interval that specifies the timespan before a disk cache hit found is to considered stale, such as interval '4 hours'.
The use of the http_disk-cache-hint is recommended for data which is known to change seldom such as seeded or reference data. The contents of the disk cache are persistent across Invantive UniversalSQL sessions.
The disk cache is located in the Cache folder of the Invantive configuration folder.
例
To disable the use of the HTTP disk cache for the query on the Contacts table:
select /*+ http_disk_cache(false) */ *
from Contacts
where email = 'john.doe@acme.eu'
limit 10
To use the contents of the HTTP disk cache for the query on the Contacts table, when not older than 7 days, and also store the results in the disk cache:
select /*+ http_disk_cache(true, true, interval '7 days') */ *
from Contacts
where email = 'john.doe@acme.eu'
limit 10