# Caching API requests with long-lived Workflows in Temporal

DevFeed: [Caching API requests with long-lived Workflows in Temporal](<https://devfeed.tech/articles/caching-api-requests-with-long-lived-workflows-in-temporal-35752.md>)

Original publisher: [Read original article](<https://temporal.io/blog/caching-api-requests-with-long-lived-workflows>)

Author: Valeri Karpov

Published: 2022-05-26T07:00:00Z

Content type: tutorial

Language: en

Sources: [Temporal Blog](<https://devfeed.tech/sources/temporal-blog.md>)

Topics: [Caching](<https://devfeed.tech/topics/caching.md>), [API](<https://devfeed.tech/topics/api.md>), [TypeScript](<https://devfeed.tech/topics/typescript.md>), [SDK](<https://devfeed.tech/topics/sdk.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [GitHub](<https://devfeed.tech/topics/github.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [caching](<https://devfeed.tech/tags/caching.md>), [github](<https://devfeed.tech/tags/github.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [sdk](<https://devfeed.tech/tags/sdk.md>), [state](<https://devfeed.tech/tags/state.md>), [typescript](<https://devfeed.tech/tags/typescript.md>), [workflows](<https://devfeed.tech/tags/workflows.md>)

## AI overview

This tutorial explains how to use Temporal long-lived Workflows to cache API requests. It demonstrates a TypeScript Workflow that refreshes exchange rates once per day, stores the latest result, and avoids explicit database calls or cron jobs.

## Source excerpt

Discover how Temporal's long-lived workflows can help cache API calls, store state, and respond to signals and queries using the Continue-As-New feature.