---
id: "infinispan"
type: "component"
kind: "cache"
provider: "default"
category: "data"
docs: "https://infinispan.org/docs/stable/titles/configuring/configuring.html"
url: "https://localhost:3000/catalogue/components/infinispan"
---

# Infinispan

Distributed in-memory key-value store with two owners per entry and optional cache stores.

| | |
|---|---|
| Provider | [default](https://localhost:3000/catalogue?provider=default) |
| Kind | [Cache](https://localhost:3000/catalogue/kinds/cache) |
| Category | Data |
| Official docs | [https://infinispan.org/docs/stable/titles/configuring/configuring.html](https://infinispan.org/docs/stable/titles/configuring/configuring.html) |

## Properties

| property | type | values | required | kind default | this component |
|---|---|---|---|---|---|
| `cacheMode` | enum | `local`, `replicated`, `distributed`, `invalidation` | no | — | inherited |
| `crossSiteReplication` | boolean | — | no | false | inherited |
| `evictionPolicy` | enum | `lru`, `lfu`, `ttl`, `none` | no | — | inherited |
| `hashing` (advanced) | enum | `none`, `consistent` | no | "none" | **"consistent"** |
| `invalidation` | enum | `ttl`, `event`, `none` | no | "ttl" | inherited |
| `managed` | boolean | — | no | false | inherited |
| `materialised` (advanced) | boolean | — | no | false | inherited |
| `owners` | integer | — | no | 2 | inherited |
| `persistence` | boolean | — | no | false | **false** |
| `readBarrier` (advanced) | boolean | — | no | false | inherited |
| `replication` | enum | `none`, `single-az`, `multi-az`, `multi-region` | no | "none" | inherited |
| `shards` | integer | — | no | — | inherited |
| `structure` (advanced) | enum | `key-value`, `bloom-filter`, `hash-set`, `sorted-set` | no | "key-value" | inherited |
| `tier` (advanced) | enum | `core`, `edge` | no | "core" | inherited |
| `ttlJitter` (advanced) | boolean | — | no | false | inherited |
| `ttlSeconds` | integer | — | no | — | inherited |
| `usedAsPrimaryStore` (advanced) | boolean | — | no | false | inherited |

Bold values are the ones this component pins.

## Rules that apply · 3

### Cache used as primary store without persistence `cache-as-primary-store-without-persistence` (error)

- Page: https://localhost:3000/catalogue/rules/cache-as-primary-store-without-persistence.md
- Why: This cache is the only copy of its data and has persistence turned off. A restart loses the data outright.
- Applies to: every node of kind cache
- Message: Cache '{{node.id}}' is the primary store for its data but has persistence disabled.

It fires when:

- all of these hold:
  - the node's `usedAsPrimaryStore` is true
  - the node's `persistence` is false

### Cache without eviction policy `cache-missing-eviction-policy` (warning)

- Page: https://localhost:3000/catalogue/rules/cache-missing-eviction-policy.md
- Why: A cache with no declared eviction policy inherits whatever the vendor chose, and most vendors default to evicting nothing. The cache fills up and then starts refusing writes.
- Applies to: every node of kind cache
- Message: Cache '{{node.id}}' has no eviction policy. Declare lru, lfu or ttl, or justify none explicitly.

It fires when:

- any of these hold:
  - the node's `evictionPolicy` has no value
  - the node's `evictionPolicy` is "none"

### Materialised cache without a rebuild path `materialised-cache-without-rebuild-path` (error)

- Page: https://localhost:3000/catalogue/rules/materialised-cache-without-rebuild-path.md
- Why: A cache holding materialised views has to be rebuildable from a durable store or a worker. With nothing feeding it, a cold cache is a permanent gap rather than a slow start.
- Applies to: every node of kind cache
- Message: Cache '{{node.id}}' holds materialised data but nothing durable or no worker feeds it. It cannot be rebuilt after loss.

It fires when:

- all of these hold:
  - the node's `materialised` is true
  - this does not hold:
    - the node has at least one incoming edge from a sql-database, nosql-database, worker or stream

## Other products of the same kind · 36

- [ApsaraDB for Memcache](https://localhost:3000/catalogue/components/alibaba-apsaradb-memcache.md) `alibaba-apsaradb-memcache` — alibabacloud
- [ApsaraDB for Redis](https://localhost:3000/catalogue/components/alibaba-apsaradb-redis.md) `alibaba-apsaradb-redis` — alibabacloud
- [Amazon DynamoDB Accelerator (DAX)](https://localhost:3000/catalogue/components/aws-dax.md) `aws-dax` — aws
- [Amazon ElastiCache](https://localhost:3000/catalogue/components/aws-elasticache.md) `aws-elasticache` — aws
- [Amazon MemoryDB](https://localhost:3000/catalogue/components/aws-memorydb.md) `aws-memorydb` — aws
- [Azure Cache for Redis](https://localhost:3000/catalogue/components/azure-cache-for-redis.md) `azure-cache-for-redis` — azure
- [Azure Managed Redis](https://localhost:3000/catalogue/components/azure-managed-redis.md) `azure-managed-redis` — azure
- [Generic cache](https://localhost:3000/catalogue/components/cache.md) `cache` — default
- [Cache cluster](https://localhost:3000/catalogue/components/cache-cluster.md) `cache-cluster` — default
- [cognee](https://localhost:3000/catalogue/components/cognee.md) `cognee` — default
- [Dragonfly](https://localhost:3000/catalogue/components/dragonfly.md) `dragonfly` — default
- [EVCache](https://localhost:3000/catalogue/components/evcache.md) `evcache` — default
- [Microsoft Garnet](https://localhost:3000/catalogue/components/garnet.md) `garnet` — default
- [VMware GemFire](https://localhost:3000/catalogue/components/gemfire.md) `gemfire` — default
- [Graphiti](https://localhost:3000/catalogue/components/graphiti.md) `graphiti` — default
- [Hazelcast](https://localhost:3000/catalogue/components/hazelcast.md) `hazelcast` — default
- [Apache Ignite](https://localhost:3000/catalogue/components/ignite.md) `ignite` — default
- [KeyDB](https://localhost:3000/catalogue/components/keydb.md) `keydb` — default
- [Letta](https://localhost:3000/catalogue/components/letta.md) `letta` — default
- [Mem0](https://localhost:3000/catalogue/components/mem0.md) `mem0` — default
- [Memcached](https://localhost:3000/catalogue/components/memcached.md) `memcached` — default
- [Redis](https://localhost:3000/catalogue/components/redis.md) `redis` — default
- [Redis Cloud](https://localhost:3000/catalogue/components/redis-cloud.md) `redis-cloud` — default
- [Squid](https://localhost:3000/catalogue/components/squid.md) `squid` — default
- [Trickster](https://localhost:3000/catalogue/components/trickster.md) `trickster` — default
- [Upstash Redis](https://localhost:3000/catalogue/components/upstash.md) `upstash` — default
- [Valkey](https://localhost:3000/catalogue/components/valkey.md) `valkey` — default
- [Varnish Cache](https://localhost:3000/catalogue/components/varnish.md) `varnish` — default
- [Zep](https://localhost:3000/catalogue/components/zep.md) `zep` — default
- [Memorystore for Redis](https://localhost:3000/catalogue/components/google-memorystore.md) `google-memorystore` — gcp
- [Memorystore for Memcached](https://localhost:3000/catalogue/components/google-memorystore-memcached.md) `google-memorystore-memcached` — gcp
- [Memorystore for Redis Cluster](https://localhost:3000/catalogue/components/google-memorystore-redis-cluster.md) `google-memorystore-redis-cluster` — gcp
- [Memorystore for Valkey](https://localhost:3000/catalogue/components/google-memorystore-valkey.md) `google-memorystore-valkey` — gcp
- [IBM Cloud Databases for Redis](https://localhost:3000/catalogue/components/ibm-databases-for-redis.md) `ibm-databases-for-redis` — ibm
- [OCI Cache with Redis](https://localhost:3000/catalogue/components/oci-cache-redis.md) `oci-cache-redis` — oci
- [OCI Cache with Valkey](https://localhost:3000/catalogue/components/oci-cache-valkey.md) `oci-cache-valkey` — oci

## Use it in a design

```yaml
nodes:
  - { id: "infinispan", component: "infinispan" }
```

## Source (`component` YAML, verbatim)

```yaml
# yaml-language-server: $schema=../../schema/component.schema.json
# Infinispan: distributed in-memory key-value store. Entries are immortal with no eviction, cache
# stores are off, and a distributed cache keeps two owners per entry
# ("Configuring Infinispan caches", "Embedding Infinispan").
schemaVersion: "1"
type: "component"
id: "infinispan"
kind: "cache"
provider: "default"
docs: "https://infinispan.org/docs/stable/titles/configuring/configuring.html"
defaults:
  persistence: false
  hashing: "consistent"
properties:
  cacheMode:
    type: "enum"
    values: ["local", "replicated", "distributed", "invalidation"]
  owners:
    type: "integer"
    default: 2
  crossSiteReplication:
    type: "boolean"
    default: false
```

Human page: https://localhost:3000/catalogue/components/infinispan
