Cache used as primary store without persistence

errorcache-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.

Severity
error
Selects
every node of kind cache
Components in scope
37
What it checks

It looks at every node of kind cache, and fires when:

  • — all of these hold:
  • — the node's `usedAsPrimaryStore` is true
  • — the node's `persistence` is false
Message
Cache '{{node.id}}' is the primary store for its data but has persistence disabled.

{{node.id}} style paths are filled in from the node, the edge or the design the finding is about.

Applies to · 37 components
Tripped by · 20

Reference designs whose broken twin names this rule in its header. The gate reads the same header, and fails when a rule no design trips.

Source
# yaml-language-server: $schema=../schema/rule.schema.json
# A cache used as the only copy of data, with persistence off, loses that data on restart.
# Tripped by: designs/twitter-timeline.broken.yaml
schemaVersion: "1"
type: "rule"
id: "cache-as-primary-store-without-persistence"
severity: "error"
select:
  node:
    kind: "cache"
when:
  all:
    - prop: "usedAsPrimaryStore"
      equals: true
    - prop: "persistence"
      equals: false
message: "Cache '{{node.id}}' is the primary store for its data but has persistence disabled."

The same page as markdown, for an agent: /catalogue/rules/cache-as-primary-store-without-persistence.md