# Cache Poisoning by Design

Record: `arch:cache-poisoning-by-design`
Kind: anti-pattern
Layer: [Enforcement Core](https://banes-lab.com/records/layer/enforcement-core.md)
Severity: discouraged
Scope: correctness_verification, security_governance
Canonical: https://banes-lab.com/ontology#arch-cache-poisoning-by-design

## Repair

- Refactored by: define_cache_contract, include_context_in_key, add_invalidation, add_ttl_and_version
- Detected by: cache_key_missing_user_or_tenant, cache_without_version, no_invalidation, authorization_not_in_cache_key
- Violated by: Cache data without key correctness, tenant isolation, authorization context, freshness, invalidation, or schema version.

## referenced-by

- [Caching](https://banes-lab.com/records/arch/caching.md)
