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
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"
Cache '{{node.id}}' has no eviction policy. Declare lru, lfu or ttl, or justify none explicitly.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.
ad-click-aggregationreferencecloudflare-edgereferencefigma-multiplayerreferencehotel-reservationreferenceinstagram-feedreferencekhan-academy-goliathreferencelinear-syncreferencelyft-envoyreferencemetrics-monitoringreferencemulti-region-webreferencenearby-friendsreferencereddit-feedreferencetinder-georeferencewhatsapp-messagingreferenceyoutube-upload-playbackreference
# 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."