---
schema_version: "1"
id: b869d9a3f692d380d6f5c710a20a263cbb3bf4698d0ca48c86d9e4819067b3da
title: Invalidate Cache (<ee:invalidate-cache/>)
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/anypoint-code-builder/acb-component-invalidate-cache.md
canonical_url: https://docs.mulesoft.com/jp/anypoint-code-builder/acb-component-invalidate-cache
source_site: docs.mulesoft.com
content_type: documentation
content_hash: d82404163072480b32a47f310396edcc00b3a0b6dc08eb0bfb823631b0bcdf90
description: MuleSoft Documentation Site
latest: true
---
# Invalidate Cache (<ee:invalidate-cache/>)

参照されたキャッシュ戦略内の完全なキャッシュを無効化します。

Cache スコープでキャッシュエントリの値を再計算するには、キャッシュエントリを無効化します。また、定義されたカスタムオブジェクトストアで ​`entryTtl`​ パラメーターを設定することで、時間に基づいてエントリを自動的に無効化するようにキャッシュ戦略を設定することもできます。

## [](#component-xml)コンポーネント XML

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

```xml
<ee:invalidate-cache
  cachingStrategy-ref=""
  doc:name="Invalidate cache"
  doc:id="kacopu" />
```

Invalidate Cache (​`<ee:invalidate-cache/>`​) 属性は UI および XML で設定できます。

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 20%;">
<col style="width: 20%;">
<col style="width: 60%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">属性名</th>
<th class="tableblock halign-left valign-top">属性 XML</th>
<th class="tableblock halign-left valign-top">説明</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Invalidate cache (キャッシュを無効化)</strong>​ (デフォルト)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>doc:name</code></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>キャンバスに表示されるコンポーネントの編集可能な名前。</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">なし</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>doc:id</code></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>コンポーネントの自動生成された識別子。</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Cachingstrategy ref (キャッシュ戦略参照)</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>cachingStrategy-ref</code></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>無効化するキャッシュのキャッシュ戦略への参照。</p>
</div></div></td>
</tr>
</tbody>
</table>

## [](#例)例

次の例は、キャッシュを手動で無効化する方法と、キャッシュ戦略の自動無効化を設定する方法を示しています。

### [](#example1)例: キャッシュの無効化

次の例では、参照されたキャッシュ戦略内の完全なキャッシュを無効化します。

```xml
<!-- Caching strategy configuration -->
<ee:object-store-caching-strategy name="myCachingStrategy" />

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

<flow name="invalidateCompleteCacheFlow">
  <!-- Invalidate Cache component configuration -->
  <ee:invalidate-cache cachingStrategy-ref="myCachingStrategy" />
</flow>
```

### [](#example2)例: キャッシュ戦略の自動無効化の設定

次の例では、キャッシュエントリを自動的に無効化するカスタムオブジェクトストアを使用したキャッシュ戦略を設定します。

```xml
<!-- Object Store configuration-->
<os:config name="ObjectStore_Config"/>
<!-- Caching Strategy configuration-->
<ee:object-store-caching-strategy name="Caching_Strategy">
  <!-- Object Store defined for the caching strategy -->
  <os:private-object-store
    alias="CachingStrategy_ObjectStore"
    maxEntries="100"
    entryTtl="10"
    expirationInterval="5"
    config-ref="ObjectStore_Config"/>
</ee:object-store-caching-strategy>
```

## [](#see-also)関連情報

- [オブジェクトストア設定](https://docs.mulesoft.com/mule-runtime/latest/mule-object-stores#object-store-config)
- [Invalidate Key](https://docs.mulesoft.com/jp/anypoint-code-builder/acb-component-invalidate-key)