[id='cache_mode_comparison-{context}']
= Cache Mode Comparison
The cache mode that you should choose depends on the qualities and guarantees you need for your data.

The following table summarizes the primary differences between cache modes:

//Community
ifdef::community[]
[cols="20,^15,^15,^15,^15,^15,^15",options="header"]
|============================================================
|                  | Simple      | Local       | Invalidation | Replicated | Distributed | Scattered
| Clustered        | [red]*No*    | [red]*No*    | [green]*Yes*   | [green]*Yes* | [green]*Yes* | [green]*Yes*
| Read performance | [green]*Highest* +
(local) | [green]*High* +
(local) | [green]*High* +
(local) | [green]*High* +
(local) | [yellow]*Medium* +
(owners) | [yellow]*Medium* +
(primary)
| Write performance| [green]*Highest* +
(local) | [green]*High* +
(local) | [red]*Low* +
(all nodes, no data)| [red]*Lowest* +
(all nodes)| [yellow]*Medium* +
(owner nodes) | [yellow]*Higher* +
(single RPC)
| Capacity         | [red]*Single node*| [red]*Single node*| [red]*Single node*| [red]*Smallest node*| [green]*Cluster* +
stem:[(sum_(i=1)^"nodes""node_capacity")/"owners"] | [green]*Cluster* +
stem:[(sum_(i=1)^"nodes""node_capacity")/"2"]
| Availability     | [red]*Single node*| [red]*Single node*| [red]*Single node*| [green]*All nodes*| [yellow]*Owner nodes* | [yellow]*Owner nodes*
| Features         | [red]*No TX, persistence, indexing*| [green]*All* | [red]*No indexing* | [green]*All* | [green]*All* | [yellow]*No TX*
|============================================================
endif::community[]

//Downstream
ifdef::downstream[]
[cols="15,^15,^15,^15,^20,^15,^15",options="header"]
|===

| Cache mode
| Clustered?
| Read performance
| Write performance
| Capacity
| Availability
| Capabilities

| Local
| _No_
| *High* (local)
| *High* (local)
| _Single node_
| _Single node_
| *Complete*

| Simple
| _No_
| *Highest* (local)
| *Highest* (local)
| _Single node_
| _Single node_
| _Partial:_ no transactions, persistence, or indexing.

| Invalidation
| *Yes*
| *High* (local)
| _Low_ (all nodes, no data)
| _Single node_
| _Single node_
| _Partial:_ no indexing.

| Replicated
| *Yes*
| *High* (local)
| _Lowest_ (all nodes)
| _Smallest node_
| *All nodes*
| *Complete*

| Distributed
| *Yes*
| _Medium_ (owners)
| _Medium_ (owner nodes)
| Sum of all nodes capacity divided by the number of owners.
| _Owner nodes_
| *Complete*

| Scattered
| *Yes*
| _Medium_ (primary)
| _Higher_ (single RPC)
| Sum of all nodes capacity divided by 2.
| _Owner nodes_
| _Partial:_ no transactions.

|===

endif::downstream[]
