---
description: New runtime APIs allow you to control when subrequests revalidate cache, increasing compatibility with popular NPM packages
title: Requests made from Cloudflare Workers can now force a revalidation of their cache with the origin
image: https://developers.cloudflare.com/changelog/post/2025-08-07-cache-no-cache/og.png?v=3ccdc358d9fed2c5
---

[Skip to content](#main-content)

[View RSS feeds](https://developers.cloudflare.com/fundamentals/new-features/available-rss-feeds/) [ Subscribe to RSS](https://developers.cloudflare.com/changelog/rss/index.xml)

[Back to all posts](https://developers.cloudflare.com/changelog)

August 7, 2025

## Requests made from Cloudflare Workers can now force a revalidation of their cache with the origin

[Workers](https://developers.cloudflare.com/workers/)

Copy as Markdown| [View as Markdown](https://developers.cloudflare.com/changelog/post/2025-08-07-cache-no-cache/index.md)| [Agent setup](https://developers.cloudflare.com/agent-setup/)

By setting the value of the `cache` property to `no-cache`, you can force [Cloudflare's cache](https://developers.cloudflare.com/workers/reference/how-the-cache-works/) to revalidate its contents with the origin when making subrequests from [Cloudflare Workers](https://developers.cloudflare.com/workers).

*index.jsjs*

```js
export default {
	async fetch(req, env, ctx) {
		const request = new Request("https://cloudflare.com", {
			cache: "no-cache",
		});
		const response = await fetch(request);
		return response;
	},
};
```

*index.tsts*

```ts
export default {
  async fetch(req, env, ctx): Promise<Response> {
		const request = new Request("https://cloudflare.com", { cache: 'no-cache'});
		const response = await fetch(request);
    return response;
  }
} satisfies ExportedHandler<Environment>
```

When `no-cache` is set, the Worker request will first look for a match in Cloudflare's cache, then:

- If there is a match, a conditional request is sent to the origin, regardless of whether or not the match is fresh or stale. If the resource has not changed, the cached version is returned. If the resource has changed, it will be downloaded from the origin, updated in the cache, and returned.
- If there is no match, Workers will make a standard request to the origin and cache the response.

This increases compatibility with NPM packages and JavaScript frameworks that rely on setting the [`cache`](https://developers.cloudflare.com/workers/runtime-apis/request/#options) property, which is a cross-platform standard part of the [`Request`](https://developers.cloudflare.com/workers/runtime-apis/request/) interface. Previously, if you set the `cache` property on `Request` to `'no-cache'`, the Workers runtime threw an exception.

- Learn [how the Cache works with Cloudflare Workers](https://developers.cloudflare.com/workers/reference/how-the-cache-works/)
- Enable [Node.js compatibility](https://developers.cloudflare.com/workers/runtime-apis/nodejs/) for your Cloudflare Worker
- Explore [Runtime APIs](https://developers.cloudflare.com/workers/runtime-apis/) and [Bindings](https://developers.cloudflare.com/workers/runtime-apis/bindings/) available in Cloudflare Workers

```json
{"@context":"https://schema.org","@type":"BlogPosting","@id":"https://developers.cloudflare.com/changelog/post/2025-08-07-cache-no-cache/#page","headline":"Requests made from Cloudflare Workers can now force a revalidation of their cache with the origin","description":"New runtime APIs allow you to control when subrequests revalidate cache, increasing compatibility with popular NPM packages","url":"https://developers.cloudflare.com/changelog/post/2025-08-07-cache-no-cache/","inLanguage":"en","image":"https://developers.cloudflare.com/changelog/post/2025-08-07-cache-no-cache/og.png?v=3ccdc358d9fed2c5","dateModified":"2025-08-07","datePublished":"2025-08-07","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
```
