このページは、まだ日本語ではご利用いただけません。翻訳中です。
構成
このプラグインはDBレスモードに対応しています。
互換性のあるプロトコル
Proxy Caching Advancedプラグインは以下のプロトコルに対応しています:
 grpc, grpcs, http, https
パラメータ
このプラグインの設定で使用できるすべてのパラメータのリストは次のとおりです。
- 
    name or pluginstring requiredプラグイン名。この場合は proxy-cache-advanced。- Kong Admin API、Kong Konnect API、宣言型構成、または decK ファイルを使用する場合、フィールドはnameです。
- Kubernetes で KongPlugin オブジェクトを使用する場合、フィールドはpluginです。
 
- Kong Admin API、Kong Konnect API、宣言型構成、または decK ファイルを使用する場合、フィールドは
- 
      instance_namestringプラグインのインスタンスを識別するための任意のカスタム名 (例: proxy-cache-advanced_my-service。インスタンス名はKong ManagerとKonnectに表示されるので、 例えば複数のサービスで同じプラグインを複数のコンテキストで実行する場合に便利です。また、Kong Admin API経由で特定のプラグインインスタンスに アクセスするためにも使用できます。 インスタンス名は、次のコンテキスト内で一意である必要があります。 - Kong Gateway Enterpriseのワークスペース内
- Konnectのコントロールプレーン(CP)またはコントロールプレーン(CP)グループ内
- Kong Gateway (OSS)の全世界
 
- 
      service.name or service.idstringプラグインが対象とするサービス名または ID。最上位の /pluginsエンドポイント. からプラグインをサービスに追加する場合は、これらのパラメータのいずれかを設定してください/services/{serviceName|Id}/pluginsを使用する場合は必要ありません。
- 
      route.name or route.idstringプラグインがターゲットとするルート名または ID。最上位の /pluginsエンドポイント. を通るルートにプラグインを追加する場合は、これらのパラメータのいずれかを設定してください/routes/{routeName|Id}/pluginsを使用する場合は必要ありません。
- 
      consumer.name or consumer.idstringプラグインがターゲットとするコンシューマーの名前または ID。 最上位の /pluginsエンドポイント. からコンシューマーにプラグインを追加する場合は、これらのパラメーターのいずれかを設定してください/consumers/{consumerName|Id}/pluginsを使用する場合は必要ありません。
- 
      consumer_group.name or consumer_group.idstringプラグインが対象とするコンシューマグループの名前または ID。 設定されている場合、プラグインは指定されたグループが認証されているリクエストに対してのみアクティブになります /pluginsエンドポイント./consumer_groups/{consumerGroupName|Id}/pluginsを使用する場合は必要ありません。
- 
    enabledboolean default:trueこのプラグインが適用されるかどうか。 
- 
  configrecord required- 
  response_codearray of typeintegerrequired default:200, 301, 404len_min:1Upstream response status code considered cacheable. The integers must be a value between 100 and 900. 
 - 
  request_methodarray of typestringrequired default:GET, HEADMust be one of:HEAD,GET,POST,PATCH,PUTDownstream request methods considered cacheable. Available options: HEAD,GET,POST,PATCH,PUT.
 - 
  content_typearray of typestringrequired default:text/plain, application/jsonUpstream response content types considered cacheable. The plugin performs an exact match against each specified value; for example, if the upstream is expected to respond with a application/json; charset=utf-8content-type, the plugin configuration must contain said value or aBypasscache status is returned.
 - 
  cache_ttlinteger default:300TTL in seconds of cache entities. 
 - 
  strategystring required Must be one of:memory,redisThe backing data store in which to hold cache entities. Accepted values are: memoryandredis.
 - 
  cache_controlboolean required default:falseWhen enabled, respect the Cache-Control behaviors defined in RFC7234. 
 - 
  ignore_uri_caseboolean default:falseDetermines whether to treat URIs as case sensitive. By default, case sensitivity is enabled. If set to true, requests are cached while ignoring case sensitivity in the URI. 
 - 
  storage_ttlintegerNumber of seconds to keep resources in the storage backend. This value is independent of cache_ttlor resource TTLs defined by Cache-Control behaviors.
 - 
  memoryrecord required- 
  dictionary_namestring required default:kong_db_cacheThe name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template. 
 
- 
  
 - 
  vary_query_paramsarray of typestringRelevant query parameters considered for the cache key. If undefined, all params are taken into consideration. By default, the max number of params accepted is 100. You can change this value via the lua_max_post_argsinkong.conf.
 - 
  vary_headersarray of typestringRelevant headers considered for the cache key. If undefined, none of the headers are taken into consideration. 
 - 
  response_headersrecord requiredCaching related diagnostic headers that should be included in cached responses - 
  ageboolean default:true
 - 
  X-Cache-Statusboolean default:true
 - 
  X-Cache-Keyboolean default:true
 
- 
  
 - 
  redisrecord required- 
  hoststring default:127.0.0.1A string representing a host name, such as example.com. 
 - 
  portinteger default:6379between:065535An integer representing a port number between 0 and 65535, inclusive. 
 - 
  connect_timeoutinteger default:2000between:02147483646An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2. 
 - 
  send_timeoutinteger default:2000between:02147483646An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2. 
 - 
  read_timeoutinteger default:2000between:02147483646An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2. 
 - 
  usernamestring referenceableUsername to use for Redis connections. If undefined, ACL authentication won’t be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to default.
 - 
  passwordstring referenceable encryptedPassword to use for Redis connections. If undefined, no AUTH commands are sent to Redis. 
 - 
  sentinel_usernamestring referenceableSentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won’t be performed. This requires Redis v6.2.0+. 
 - 
  sentinel_passwordstring referenceable encryptedSentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels. 
 - 
  databaseinteger default:0Database to use for the Redis connection when using the redisstrategy
 - 
  keepalive_pool_sizeinteger default:256between:12147483646The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither keepalive_pool_sizenorkeepalive_backlogis specified, no pool is created. Ifkeepalive_pool_sizeisn’t specified butkeepalive_backlogis specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.
 - 
  keepalive_backloginteger between:02147483646Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return nil. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less thankeepalive_pool_size. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger thankeepalive_pool_size.
 - 
  sentinel_masterstringSentinel master to use for Redis connections. Defining this value implies using Redis Sentinel. 
 - 
  sentinel_rolestring Must be one of:master,slave,anySentinel role to use for Redis connections when the redisstrategy is defined. Defining this value implies using Redis Sentinel.
 - 
  sentinel_nodesarray of typerecordlen_min:1Sentinel node addresses to use for Redis connections when the redisstrategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.- 
  hoststring required default:127.0.0.1A string representing a host name, such as example.com. 
 - 
  portinteger default:6379between:065535An integer representing a port number between 0 and 65535, inclusive. 
 
- 
  
 - 
  cluster_nodesarray of typerecordlen_min:1Cluster addresses to use for Redis connections when the redisstrategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.- 
  ipstring required default:127.0.0.1A string representing a host name, such as example.com. 
 - 
  portinteger default:6379between:065535An integer representing a port number between 0 and 65535, inclusive. 
 
- 
  
 - 
  sslboolean default:falseIf set to true, uses SSL to connect to Redis. 
 - 
  ssl_verifyboolean default:falseIf set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure lua_ssl_trusted_certificateinkong.confto specify the CA (or server) certificate used by your Redis server. You may also need to configurelua_ssl_verify_depthaccordingly.
 - 
  server_namestringA string representing an SNI (server name indication) value for TLS. 
 - 
  cluster_max_redirectionsinteger default:5Maximum retry attempts for redirection. 
 - 
  connection_is_proxiedboolean default:falseIf the connection to Redis is proxied (e.g. Envoy), set it true. Set thehostandportto point to the proxy address.
 
- 
  
 - 
  bypass_on_errboolean default:falseUnhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with Bypass, with the request going upstream.
 
- 
  
 
                      