Durable Execution
Caching API Calls with Long-Lived Workflows in Temporal

Caching API Calls with Long-Lived Workflows in Temporal

5/26/2022

What this post added

This post demonstrates how to use Temporal's long-lived Workflows and Activities to implement a stateful caching layer for API calls. It details the creation of a Workflow that periodically fetches exchange rates from an external API using an Activity, stores the rates in memory, and exposes them via a Query. The post also explains the importance of `Continue-As-New` to manage the Workflow's event history limit and how to pass state between Workflow executions. It highlights Temporal's ability to handle state persistence, scheduling, and querying without explicit database or cron job management.

Read the original post ↗