# Caching

Record: `arch:caching`
Kind: pattern
Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)
Severity: contextual
Scope: data access, computation, API
Canonical: https://banes-lab.com/ontology#arch-caching

## Repair

- Refactored by: Add Cache, Define TTL/Invalidation
- Detected by: hot repeated reads, high latency calls
- Violated by: repeated expensive computation/query with stable result
- Measured by: hit ratio, stale read rate
- Enforced by: performance tests

## requires

- [Invalidation Policy](https://banes-lab.com/records/lex/invalidation-policy.md)

## reinforces

- [Latency Reduction](https://banes-lab.com/records/lex/latency-reduction.md)
- [Scalability](https://banes-lab.com/records/arch/scalability.md)

## enables

- [Reduced Load](https://banes-lab.com/records/lex/reduced-load.md)

## conflicts-with

- [Cache Poisoning by Design](https://banes-lab.com/records/arch/cache-poisoning-by-design.md)

## tensions-with

- [Consistency](https://banes-lab.com/records/arch/consistency.md)
- [Always-Fresh Reads](https://banes-lab.com/records/lex/always-fresh-reads.md)

## tensions

- [Caching Consistency](https://banes-lab.com/records/tension/caching-consistency.md)
- [Caching Always-Fresh Reads](https://banes-lab.com/records/tension/always-fresh-reads-caching.md)

## referenced-by

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