Area: Performance & Caching
Difficulty: Medium
Labels: Type: Performance, Layer: Core-Translation
Context & Problem Statement
On-chain events are completely immutable; once an event is emitted and decoded on a specific ledger, its plain-English translation will never change. Currently, our system re-runs the translation string interpolation logic and template assembly every time a user requests an event log via the API. For high-volume contracts (like AMM liquidity pools), this causes redundant CPU cycles and unnecessary database reads.
Proposed Implementation Plan
Introduce a Redis instance into the infrastructure and configure a layered caching pipeline.
For read requests, implement a Cache-Aside pattern: use a deterministic cache key combined from the event's unique blockchain signature (tx_hash + event_index).
If a cache hit occurs, bypass database serialization and return the pre-compiled translation payload directly.
Set an intelligent eviction policy, or keep historical event translations permanently cached while applying a standard Time-To-Live (TTL) exclusively to volatile dashboard aggregation metrics.
Acceptance Criteria
[ ] Read operations for highly requested event logs show a >60% reduction in response latency under heavy load simulations.
[ ] Cache invalidation scripts successfully purge old schema formats if an emergency correction is pushed to the Translation Registry.
Area: Performance & Caching
Difficulty: Medium
Labels: Type: Performance, Layer: Core-Translation
Context & Problem Statement
On-chain events are completely immutable; once an event is emitted and decoded on a specific ledger, its plain-English translation will never change. Currently, our system re-runs the translation string interpolation logic and template assembly every time a user requests an event log via the API. For high-volume contracts (like AMM liquidity pools), this causes redundant CPU cycles and unnecessary database reads.
Proposed Implementation Plan
Introduce a Redis instance into the infrastructure and configure a layered caching pipeline.
For read requests, implement a Cache-Aside pattern: use a deterministic cache key combined from the event's unique blockchain signature (tx_hash + event_index).
If a cache hit occurs, bypass database serialization and return the pre-compiled translation payload directly.
Set an intelligent eviction policy, or keep historical event translations permanently cached while applying a standard Time-To-Live (TTL) exclusively to volatile dashboard aggregation metrics.
Acceptance Criteria
[ ] Read operations for highly requested event logs show a >60% reduction in response latency under heavy load simulations.
[ ] Cache invalidation scripts successfully purge old schema formats if an emergency correction is pushed to the Translation Registry.