Invantive 문서Invantive Cloud의 일부
Invantive 지원 포럼로그인 / 회원가입

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_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))

목적

http_memory_cache 힌트는 제공자가 HTTP를 사용하여 기반 플랫폼과 데이터를 주고받을 때 메시지를 메모리에 캐시할 수 있는지 여부를 지정합니다. 이는 일반적으로 Exact Online, Teamleader 또는 Salesforce와 같은 클라우드 기반 플랫폼에만 해당됩니다. 기본 설정은 실행 환경에 따라 다릅니다.

첫 번째 매개변수는 메모리 캐시에서 데이터를 가져올 수 있는지 여부를 나타내는 부울 값이고, 두 번째 매개변수는 검색된 데이터를 메모리 캐시에도 저장해야 하는지 여부를 나타내는 부울 값이며, 세 번째 매개변수는 메모리 캐시 적중 항목을 오래된 것으로 간주하기까지의 기간을 지정하는 간격입니다. 예: "interval '30 seconds'"

변경이 드물다고 알려진 데이터, 예를 들어 시드 데이터나 참조 데이터에는 http_memory-cache 힌트를 사용하는 것이 권장됩니다. 메모리 캐시의 내용은 Invantive UniversalSQL 세션 간에 유지되지 않습니다.

예시

Contacts 테이블에 대한 쿼리에서 HTTP 메모리 캐시 사용을 비활성화하려면:

select /*+ http_memory_cache(false) */ * 
from   Contacts 
where  email = 'john.doe@acme.eu'
limit  10

Contacts 테이블에 대한 쿼리에서 HTTP 메모리 캐시의 내용을 사용하되, 30분을 넘지 않은 경우에만 사용하고, 결과도 메모리 캐시에 저장하려면:

select /*+ http_memory_cache(true, true, interval '30 minutes') */ * 
from   Contacts 
where  email = 'john.doe@acme.eu'
limit  10