Contact Us 1-800-596-4880

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

Invalidate a single cache key in the referenced caching strategy.

Component XML

This component supports the following XML structure:

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

Invalidate Key (<ee:invalidate-key/>) attributes are configurable through the UI and XML.

Attribute Name Attribute XML Description

Invalidate key (default)

doc:name

Editable name for the component to display in the canvas.

N/A

doc:id

Automatically generated identifier for the component.

Cachingstrategy ref

cachingStrategy-ref

Reference to the caching strategy for the cache key to invalidate.

Key generation expression

keyGenerationExpression

Optional. A DataWeave expression to generate the key to invalidate. Use the same expression configured in the caching strategy that generated the key.

Keygenerator ref

keyGenerator-ref

N/A

Examples

The following example invalidates a cache key:

<!-- 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>