> ## Documentation Index
> Fetch the complete documentation index at: https://hexagraph-docs.voyla.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Response Caching Architecture

> Learn how Hexagraph Core's high-performance caching layer optimizes API latency, stores transformed JSON payloads, and manages memory.

Hexagraph Core implements a high-performance Redis cache layer to deliver low-latency API responses across all REST and GraphQL endpoints. To prevent memory bloat and redundant processing, Hexagraph stores **only final transformed Hexagraph JSON payloads** in cache — raw upstream provider responses are never stored.

***

## Time-To-Live (TTL) Settings

Different categories of data carry tailored TTL settings based on update frequency:

| Category               | Default TTL              | Description                                                        |
| :--------------------- | :----------------------- | :----------------------------------------------------------------- |
| **Entity Responses**   | **24 Hours** (86,400s)   | Governs transformed payloads for all 10 core entity modules.       |
| **Sync Microservices** | **2 Days** (172,800s)    | Governs external indexing dates, ORCID records, and DOAJ metadata. |
| **Journal Metrics**    | **7 Days** (604,800s)    | Governs Scopus, Web of Science, and ABDC metric joins.             |
| **Reference Tables**   | **30 Days** (2,592,000s) | Governs classification and language lookup tables.                 |

***

## Automated Memory Management & Eviction

To ensure gateway stability and maintain high availability, Hexagraph Core performs automated memory management:

* **Automated Memory Eviction**: If cache RAM usage reaches capacity, the gateway automatically executes non-blocking purge operations on response payloads.
* **Rate-Limit Counter Protection**: Rate-limit counters are always preserved during cache eviction cycles to ensure continuous quota enforcement.

***

## Developer Best Practices

* **Shared Multi-User Cache**: The cache is shared globally across users. If an output or author was recently queried by another user, your request will hit the cache and return near-instantly.
* **Identical Payloads Across Interfaces**: REST endpoints and GraphQL queries share 100% of the underlying service cache — a lookup via REST warms the cache for GraphQL and vice versa.
