[id='passivation_{context}']
= Passivation
Passivation configures {brandname} to write entries to cache stores when it
evicts those entries from memory. In this way, passivation prevents unnecessary
and potentially expensive writes to persistent storage.

Activation is the process of restoring entries to memory from the cache store
when there is an attempt to access passivated entries. For this reason, when you
enable passivation, you must configure a cache store that implements the
`NonBlockingStore` interface. The store's `characteristics()` method must
also indicate that it supports both read and write operations.

When {brandname} evicts an entry from the cache, it notifies cache listeners
that the entry is passivated then stores the entry in the cache store. When
{brandname} gets an access request for an evicted entry, it lazily loads the
entry from the cache store into memory and then notifies cache listeners that
the entry is activated while keeping the value still in the store.

[NOTE]
====
* Passivation uses the first cache loader in the {brandname} configuration and
ignores all others.

* Passivation is not supported with:

** Transactional stores. Passivation writes and removes entries from the store
outside the scope of the actual {brandname} commit boundaries.
** Shared stores. Shared cache stores require entries to always exist in the
store for other owners. For this reason, passivation is not supported because
entries cannot be removed.

If you enable passivation with transactional stores or shared stores,
{brandname} throws an exception.
====
