Invalidate Key (<ee:invalidate-key/>)

参照されたキャッシュ戦略内の 1 つのキャッシュキーを無化します。

コンポーネント XML

このコンポーネントは、次の XML 構造をサポートします。

<ee:invalidate-key
  cachingStrategy-ref=""
  doc:name="Invalidate key"
  doc:id="ezsaex" />
<ee:invalidate-key/>​ Attributes 説明

doc:name

コンポーネントの編集可能な名前。

doc:id

コンポーネントの自動生成された識別子。

cachingStrategy-ref

無効化するキャッシュキーを含むキャッシュ戦略への参照。

keyGenerationExpression

省略可能。無効化するキーを生成する DataWeave 式。キーを生成したキャッシュ戦略で設定された式と同じ式を使用します。

次の例では、キャッシュキーを無効化します。

<!-- Caching strategy configuration -->
<ee:object-store-caching-strategy name="myCachingStrategy" keyGenerationExpression="#[payload.key]" />

<flow name="cacheFlow">
  <ee:cache cachingStrategy-ref="myCachingStrategy">
      <!-- Processing logic inside the Cache Scope -->
  </ee:cache>
</flow>

<flow name="invalidateItemFlow">
  <!-- Invalidate Key component configuration -->
  <ee:invalidate-key cachingStrategy-ref="myCachingStrategy" keyGenerationExpression="#[payload.key]" />
</flow>