# `AshCache.Changes.InvalidateCache`
[🔗](https://github.com/Undeadlol1/ash_cache/blob/v0.1.0/lib/ash_cache/changes/invalidate_cache.ex#L1)

Invalidates a resource's cached reads after a successful write by bumping
the resource's cache version (see `AshCache.CacheVersion`).

The bump runs in `after_transaction`, never `after_action`: a write that
rolls back must leave the cache untouched, and reads running concurrently
with the transaction keep caching under the old cache version — harmless,
because the bump after commit makes those entries unreachable.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
