Feature ID: PF-51Documentation Index
Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
Use this file to discover all available pages before exploring further.
Version: 1.0
Last Updated: 2026-03-04
Status: ✅ Complete — 2026-03-05
Overview
This document describes how PF-51 (Caching Layer & Strategy) integrates with the platform. The caching layer provides a centralized, tenant-scoped cache for query results, configuration, and reference data. All cores consume it via the Platform Integration Layer (@/platform/cache); there are no cross-core dependencies.
Integration Pattern
Pattern Type: Platform Integration Layer (Pattern 1) PF-51 provides:- Caching service:
get,set,delete,clear/invalidatewith tenant-scoped keys - Cache hooks:
useCachedQueryintegrated with TanStack Query - Invalidation: Pattern-based and user-scoped invalidation; optional event-based invalidation
Public API
Location:src/platform/cache/
| Export | Purpose |
|---|---|
cacheService | get, set, delete, clear, invalidate |
useCachedQuery | TanStack Query–backed cached query hook |
| Cache key format | org-{orgId}:{namespace}:{key} (organization_id required) |
specs/pf/specs/PF-51-caching-layer-strategy.md for full API Design and FR-1/FR-2/FR-3.
Consumer Cores
All cores may use@/platform/cache for:
- Query result caching (via
useCachedQueryor direct service) - Configuration caching (org settings, preferences)
- Reference data caching (picklists, custom field definitions)
organization_id. Helpers obtain/inject current org when callers omit it; missing org id causes validation failure.
Integration Matrix
This integration is referenced in:- PLATFORM_INTEGRATION_LAYERS.md — Quick Reference table
- CROSS_CORE_INTEGRATIONS.md — PF-51 | All Cores | Platform Layer
References
- Spec:
specs/pf/specs/PF-51-caching-layer-strategy.md - Plan:
specs/pf/plans/PF-51-caching-layer-PLAN.md(when created)