Cache without eviction policy

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

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

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

  • — any of these hold:
  • — the node's `evictionPolicy` has no value
  • — the node's `evictionPolicy` is "none"
Message
Cache '{{node.id}}' has no eviction policy. Declare lru, lfu or ttl, or justify none explicitly.

{{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 · 15

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
# No declared eviction policy means the vendor default decides, and the vendor default is
# usually noeviction. Tripped by designs/multi-region-web.broken.yaml.
schemaVersion: "1"
type: "rule"
id: "cache-missing-eviction-policy"
severity: "warning"
select:
  node:
    kind: "cache"
when:
  any:
    - prop: "evictionPolicy"
      exists: false
    - prop: "evictionPolicy"
      equals: "none"
message: "Cache '{{node.id}}' has no eviction policy. Declare lru, lfu or ttl, or justify none explicitly."

The same page as markdown, for an agent: /catalogue/rules/cache-missing-eviction-policy.md