You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> **Note:** Only the first caller's callbacks (loading, success, error) are executed. Concurrent callers receive the same result but their callbacks are NOT invoked. This is intentional for deduplication.
<p>These methods are available on <code>IAsyncActionExecutor<TState></code>. Components inheriting from <code>StoreComponentWithUtilities<TState></code> also have convenience wrapper methods: <code>InvalidateCachedResult()</code>, <code>InvalidateCachedResultsByPrefix()</code>, and <code>ClearCachedResults()</code>.</p>
<td>Removes all cache entries matching the prefix. Example: <code>InvalidateCachedResultsByPrefix("product-")</code> clears all product caches.</td>
259
260
</tr>
260
261
<tr>
261
-
<td><code>ClearCache()</code></td>
262
+
<td><code>ClearCachedResults()</code></td>
262
263
<td>Removes all cache entries. Use on logout or when global state reset is needed.</td>
263
264
</tr>
264
265
</tbody>
265
266
</table>
267
+
268
+
<pclass="text-muted">You can also access the executor directly via <code>AsyncExecutor?.InvalidateCache()</code>, <code>AsyncExecutor?.InvalidateCacheByPrefix()</code>, and <code>AsyncExecutor?.ClearCache()</code>.</p>
266
269
</section>
267
270
268
271
<!-- When to Use -->
@@ -427,7 +430,7 @@ <h2>Cache Invalidation</h2>
427
430
await ProductApi.UpdateAsync(product);
428
431
429
432
// Force fresh data on next ExecuteCachedAsync call
430
-
InvalidateCache($"product-{product.Id}");
433
+
InvalidateCachedResult($"product-{product.Id}");
431
434
432
435
// Next component that calls ExecuteCachedAsync will fetch fresh data
0 commit comments