Catalogue / Data

Cache

datacache

In-memory key-value store placed in front of a slower datastore.

Category
Data
Properties
14
Components
37
Rules
3
Properties · 14 defined by this kind

A node of this kind resolves each property from its own props, then the component's defaults, then the default below.

propertytypevaluesrequireddefault
evictionPolicyenumlru | lfu | ttl | noneno—
hashing · advancedenumnone | consistentnonone
invalidationenumttl | event | nonenottl
managedboolean—nofalse
materialised · advancedboolean—nofalse
persistenceboolean—nofalse
readBarrier · advancedboolean—nofalse
replicationenumnone | single-az | multi-az | multi-regionnonone
shardsinteger—no—
structure · advancedenumkey-value | bloom-filter | hash-set | sorted-setnokey-value
tier · advancedenumcore | edgenocore
ttlJitter · advancedboolean—nofalse
ttlSecondsinteger—no—
usedAsPrimaryStore · advancedboolean—nofalse
Rules for this kind · 3
cache-as-primary-store-without-persistence

This cache is the only copy of its data and has persistence turned off. A restart loses the data outright.

  • — all of these hold:
  • — the node's `usedAsPrimaryStore` is true
  • — the node's `persistence` is false
cache-missing-eviction-policy

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.

  • — any of these hold:
  • — the node's `evictionPolicy` has no value
  • — the node's `evictionPolicy` is "none"
materialised-cache-without-rebuild-path

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.

  • — 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
Components · 37
Source
# yaml-language-server: $schema=../schema/kind.schema.json
# In-memory key-value store placed in front of a slower datastore.
# evictionPolicy is deliberately optional with no default; cache-missing-eviction-policy reports its absence.
# shards counts the identical shards of one cache; two or more draw the node as a stack.
schemaVersion: "1"
type: "kind"
id: "cache"
category: "data"
properties:
  evictionPolicy:
    type: "enum"
    values: ["lru", "lfu", "ttl", "none"]
  ttlSeconds:
    type: "integer"
  ttlJitter:
    type: "boolean"
    default: false
    advanced: true
  persistence:
    type: "boolean"
    default: false
  replication:
    type: "enum"
    values: ["none", "single-az", "multi-az", "multi-region"]
    default: "none"
  invalidation:
    type: "enum"
    values: ["ttl", "event", "none"]
    default: "ttl"
  hashing:
    type: "enum"
    values: ["none", "consistent"]
    default: "none"
    advanced: true
  usedAsPrimaryStore:
    type: "boolean"
    default: false
    advanced: true
  materialised:
    type: "boolean"
    default: false
    advanced: true
  structure:
    type: "enum"
    values: ["key-value", "bloom-filter", "hash-set", "sorted-set"]
    default: "key-value"
    advanced: true
  readBarrier:
    type: "boolean"
    default: false
    advanced: true
  tier:
    type: "enum"
    values: ["core", "edge"]
    default: "core"
    advanced: true
  shards:
    type: "integer"
  managed:
    type: "boolean"
    default: false

The same page as markdown, for an agent: /catalogue/kinds/cache.md