---
id: ADR-PFM-ELG-008
title: 'Caches are disposable, keyed by content and bounded in staleness'
product_area: platform
module: eligibility
revision: 1
status: proposed
design_intent: proposed
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
decision: >-
  Cache plans by their inputs and cache suitable display answers for two
  minutes, treating optional cache failures as misses.
constrains:
  - DOM-PFM-ELG-002
  - DOM-PFM-ELG-003
  - SVC-PFM-ELG-eligibility
  - WF-PFM-ELG-002
  - WF-PFM-ELG-004
  - WF-PFM-ELG-008
origin: >-
  none (implementation choice recorded in the module record; FND-PFM-ELG-010 and
  FND-PFM-ELG-014 note its gaps)
alternatives:
  - option: Invalidate every entry explicitly
    why_not: >-
      Missed invalidations are difficult to detect across processes and shared
      storage.
  - option: Disable caching
    why_not: Every repeated read would pay compilation and query costs.
consequences:
  - Plan inputs select a new fingerprint when their meaning changes.
  - Publication advances the rule generation used by display answers.
  - >-
    Authorization, transactional, uncertain and trial results bypass display
    caching.
  - Subject-event invalidation does not cover every answer-cache path.
supersedes: []
evidence:
  - >-
    services-platform at ad3f6a6: services/compile/plan-cache.ts, cache-
    store.ts; services/evaluate/decision-cache.ts;
    services/invalidation/decision-cache-keys.ts; docs/eligibility.md §8.3, §11,
    §16
---
# Caches are disposable, keyed by content and bounded in staleness

## Context

Repeated page reads should not repeatedly compile the same expression.

## Decision

Cache plans by their inputs and cache suitable display answers for two minutes, treating optional cache failures as misses.

## Alternatives Considered

Invalidate every entry explicitly: Missed invalidations are difficult to detect across processes and shared storage.

Disable caching: Every repeated read would pay compilation and query costs.

## Consequences

Plan inputs select a new fingerprint when their meaning changes. Publication advances the rule generation used by display answers. Authorization, transactional, uncertain and trial results bypass display caching. Subject-event invalidation does not cover every answer-cache path.
