Zum Inhalt springen

Developer Platform Updates & Release Notes

583 Einträge aus 1 Quelle. Zuletzt aktualisiert:

Folge Developer Platform, um die Release Notes in deinen Feed zu holen.

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Developer Platform von Cloudflare

Browser Run: Ganze Websites per /crawl-Endpoint crawlen

Der neue /crawl-Endpoint von Browser Rendering (Open Beta) durchsucht ab einer Start-URL automatisch eine ganze Website, rendert die Seiten und liefert sie asynchron als HTML, Markdown oder strukturiertes JSON, wobei robots.txt und AI Crawl Control standardmäßig beachtet werden.

Edit: this post has been edited to clarify crawling behavior with respect to site guidance.

You can now crawl an entire website with a single API call using Browser Rendering's new /crawl endpoint, available in open beta. Submit a starting URL, and pages are automatically discovered, rendered in a headless browser, and returned in multiple formats, including HTML, Markdown, and structured JSON. The endpoint is a verified bot (intermediary agent) that respects robots.txt and AI Crawl Control ↗︎ by default, making it easy for developers to comply with website rules, and making it less likely for crawlers to ignore web-owner guidance. This is great for training models, building RAG pipelines, and researching or monitoring content across a site.

Crawl jobs run asynchronously. You submit a URL, receive a job ID, and check back for results as pages are processed.

# Initiate a crawl
curl -X POST 'https://api.cloudflare.com/client/v4/accounts/{account_id}/browser-rendering/crawl' \
  -H 'Authorization: Bearer <apiToken>' \
  -H 'Content-Type: application/json' \
  -d '{
    "url": "https://blog.cloudflare.com/"
  }'

# Check results …

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Developer Platform von Cloudflare

Workflows: Retry-Versuchsnummer im Step-Kontext verfügbar

In step.do() ist über ctx.attempt jetzt die Nummer des aktuellen Wiederholungsversuchs (1-basiert) abrufbar, etwa für Logging, progressives Backoff oder bedingte Logik.

Cloudflare Workflows allows you to configure specific retry logic for each step in your workflow execution. Now, you can access which retry attempt is currently executing for calls to step.do():

await step.do("my-step", async (ctx) => {
	// ctx.attempt is 1 on first try, 2 on first retry, etc.
	console.log(`Attempt ${ctx.attempt}`);
});

You can use the step context for improved logging & observability, progressive backoff, or conditional logic in your workflow definition.

Note that the current attempt number is 1-indexed. For more information on retry behavior, refer to Sleeping and Retrying.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Developer Platform von Cloudflare

RealtimeKit: Echtzeit-Transkription in 10 Sprachen mit Varianten

Die Echtzeit-Transkription in RealtimeKit unterstützt über Deepgram Nova-3 auf Workers AI nun 10 Sprachen mit regionalen Varianten, einstellbar über ai_config.transcription.language, und die Audioverarbeitung läuft durchgehend im Cloudflare-Netzwerk.

Real-time transcription in RealtimeKit now supports 10 languages with regional variants, powered by Deepgram Nova-3 running on Workers AI.

During a meeting, participant audio is routed through AI Gateway to Nova-3 on Workers AI — so transcription runs on Cloudflare's network end-to-end, reducing latency compared to routing through external speech-to-text services.

Set the language when creating a meeting via ai_config.transcription.language:

{
	"ai_config": {
		"transcription": {
			"language": "fr"
		}
	}
}

Supported languages include English, Spanish, French, German, Hindi, Russian, Portuguese, Japanese, Italian, and Dutch — with regional variants like en-AU, en-GB, en-IN, en-NZ, es-419, fr-CA, de-CH, pt-BR, and pt-PT. Use multi for automatic multilingual detection.

If you are building voice agents or real-time translation workflows, your agent can now transcribe in the caller's language natively — no extra services or routing logic needed.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Developer Platform von Cloudflare

Browser Rendering: 3-fach höhere REST-API-Rate

Das Rate Limit der Browser Rendering REST API für Workers-Paid-Pläne wurde von 3 auf 10 Anfragen pro Sekunde (600 pro Minute) erhöht, ohne dass Nutzer etwas tun müssen.

Browser Rendering REST API rate limits for Workers Paid plans have been increased from 3 requests per second (180/min) to 10 requests per second (600/min). No action is needed to benefit from the higher limit.

Browser Rendering REST API rate limit increased from 3 to 10 requests per second

The REST API lets you perform common browser tasks with a single API call, and you can now do it at a higher rate.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Developer Platform von Cloudflare

Markdown Conversion: Neue conversionOptions in Workers AI

Über ein conversionOptions-Objekt lässt sich die Markdown Conversion nun anpassen, etwa mit der Sprache für Bildbeschreibungen, CSS-Selektoren oder Hostnamen für HTML sowie dem Ausschluss von PDF-Metadaten.

You can now customize how the Markdown Conversion service processes different file types by passing a conversionOptions object.

Available options:

  • Images: Set the language for AI-generated image descriptions
  • HTML: Use CSS selectors to extract specific content, or provide a hostname to resolve relative links
  • PDF: Exclude metadata from the output

Use the env.AI binding:

await env.AI.toMarkdown(
	{ name: "page.html", blob: new Blob([html]) },
	{
		conversionOptions: {
			html: { cssSelector: "article.content" },
			image: { descriptionLanguage: "es" },
		},
	},
);
await env.AI.toMarkdown(
	{ name: "page.html", blob: new Blob([html]) },
	{
		conversionOptions: {
			html: { cssSelector: "article.content" },
			image: { descriptionLanguage: "es" },
		},
	},
);

Or call the REST API:

curl https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/tomarkdown \
  -H 'Authorization: Bearer {API_TOKEN}' \
  -F 'files=@index.html' \
  -F 'conversionOptions={"html": {"cssSelector": "article.content"}}'

For more details, refer to Conversion Options.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Developer Platform von Cloudflare

Workflows: Step-Limit auf bis zu 25.000 Steps pro Instanz erhöht

Workflows auf Workers Paid unterstützen standardmäßig 10.000 Steps pro Instanz, konfigurierbar bis 25.000 in der wrangler.jsonc (zuvor 1.024), während das Limit für persistierten Zustand bei 100 MB (Free) bzw. 1 GB (Paid) bleibt.

Each Workflow on Workers Paid now supports 10,000 steps by default, configurable up to 25,000 steps in your wrangler.jsonc file:

{
	"workflows": [
		{
			"name": "my-workflow",
			"binding": "MY_WORKFLOW",
			"class_name": "MyWorkflow",
			"limits": {
				"steps": 25000
			}
		}
	]
}

Previously, each instance was limited to 1,024 steps. Now, Workflows can support more complex, long-running executions without the additional complexity of recursive or child workflow calls.

Note that the maximum persisted state limit per Workflow instance remains 100 MB for Workers Free and 1 GB for Workers Paid. Refer to Workflows limits for more information.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Developer Platform von Cloudflare

Sandboxes: Dateisystem-Überwachung in Echtzeit mit sandbox.watch()

Sandboxes unterstützen jetzt per sandbox.watch() einen Server-Sent-Events-Stream auf Basis von inotify, der create-, modify-, delete- und move-Ereignisse im Container in Echtzeit meldet.

Sandboxes now support real-time filesystem watching via sandbox.watch(). The method returns a Server-Sent Events ↗︎ stream backed by native inotify, so your Worker receives create, modify, delete, and move events as they happen inside the container.

sandbox.watch(path, options)

Pass a directory path and optional filters. The returned stream is a standard ReadableStream you can proxy directly to a browser client or consume server-side.

// Stream events to a browser client
const stream = await sandbox.watch("/workspace/src", {
	recursive: true,
	include: ["*.ts", "*.js"],
});

return new Response(stream, {
	headers: { "Content-Type": "text/event-stream" },
});
// Stream events to a browser client
const stream = await sandbox.watch("/workspace/src", {
	recursive: true,
	include: ["*.ts", "*.js"],
});

return new Response(stream, {
	headers: { "Content-Type": "text/event-stream" },
});

Server-side consumption with parseSSEStream

Use parseSSEStream to iterate over events inside a Worker without forwarding them to a client.

import { parseSSEStream } from "@cloudflare/sandbox";

const stream = await sandbox.watch("/workspace/src", { recursive: true });

for await (const event of parseSSEStream(stream)) { …

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Developer Platform von Cloudflare

Agents SDK 0.7.0: neue Observability, keepAlive, waitForMcpConnections

Agents SDK Version 0.7.0 ersetzt die Observability durch strukturierte Events über diagnostics_channel, ergänzt keepAlive() gegen das Entfernen von Durable Objects bei langen Aufgaben und führt waitForMcpConnections ein, damit MCP-Tools bei onChatMessage verfügbar sind.

The latest release of the Agents SDK ↗︎ rewrites observability from scratch with diagnostics_channel, adds keepAlive() to prevent Durable Object eviction during long-running work, and introduces waitForMcpConnections so MCP tools are always available when onChatMessage runs.

Observability rewrite

The previous observability system used console.log() with a custom Observability.emit() interface. v0.7.0 replaces it with structured events published to diagnostics channels — silent by default, zero overhead when nobody is listening.

Every event has a type, payload, and timestamp. Events are routed to seven named channels:

Channel

Event types

agents:state

state:update

agents:rpc

rpc, rpc:error

agents:message

message:request, message:response, message:clear, message:cancel, message:error, tool:result, tool:approval

agents:schedule

schedule:create, schedule:execute, schedule:cancel, schedule:retry, schedule:error, queue:retry, queue:error

agents:lifecycle

connect, destroy

agents:workflow

workflow:start, workflow:event, workflow:approved, workflow:rejected, workflow:terminated, workflow:paused, workflow:resumed, workflow:restarted

agents:mcp …

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Developer Platform von Cloudflare

AI Gateway: Automatischer Start mit der Gateway-ID "default"

Mit der Gateway-ID "default" legt AI Gateway beim ersten Request automatisch ein Gateway an, sodass die Nutzung ohne vorherige Einrichtung mit einem einzigen API-Aufruf möglich ist.

You can now start using AI Gateway with a single API call — no setup required. Use default as your gateway ID, and AI Gateway creates one for you automatically on the first request.

To try it out, create an API token with AI Gateway - Read, AI Gateway - Edit, and Workers AI - Read permissions, then run:

curl -X POST https://gateway.ai.cloudflare.com/v1/$CLOUDFLARE_ACCOUNT_ID/default/compat/chat/completions \
  --header "cf-aig-authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "workers-ai/@cf/meta/llama-3.3-70b-instruct-fp8-fast",
    "messages": [
      {
        "role": "user",
        "content": "What is Cloudflare?"
      }
    ]
  }'

AI Gateway gives you logging, caching, rate limiting, and access to multiple AI providers through a single endpoint. For more information, refer to Get started.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Developer Platform von Cloudflare

Agents SDK 0.6.0: RPC-Transport für MCP, optionales OAuth, Fixes

Agents SDK Version 0.6.0 erlaubt die Verbindung von Agent und McpAgent im selben Worker per RPC über ein Durable-Object-Binding, macht OAuth für einfache MCP-Verbindungen optional, härtet den Schema-Konverter und bringt Zuverlässigkeits-Fixes für @cloudflare/ai-chat.

The latest release of the Agents SDK ↗︎ lets you define an Agent and an McpAgent in the same Worker and connect them over RPC — no HTTP, no network overhead. It also makes OAuth opt-in for simple MCP connections, hardens the schema converter for production workloads, and ships a batch of @cloudflare/ai-chat reliability fixes.

RPC transport for MCP

You can now connect an Agent to an McpAgent in the same Worker using a Durable Object binding instead of an HTTP URL. The connection stays entirely within the Cloudflare runtime — no network round-trips, no serialization overhead.

Pass the Durable Object namespace directly to addMcpServer:

import { Agent } from "agents";

export class MyAgent extends Agent {
	async onStart() {
		// Connect via DO binding — no HTTP, no network overhead
		await this.addMcpServer("counter", env.MY_MCP);

		// With props for per-user context
		await this.addMcpServer("counter", env.MY_MCP, {
			props: { userId: "user-123", role: "admin" },
		});
	}
}
import { Agent } from "agents";

export class MyAgent extends Agent {
	async onStart() {
		// Connect via DO binding — no HTTP, no network overhead
		await this.addMcpServer("counter", env.MY_MCP);

		// With props for per-user context
		await this.addMcpServer("counter", env.MY_MCP, {
			props: { userId: "user-123", role: "admin" },
		});
	}
}
``` …

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Developer Platform von Cloudflare

Containers: 15-fach höhere Limits für gleichzeitige Instanzen

Die Limits für gleichzeitig laufende Container-Instanzen wurden auf 6 TiB Speicher, 1.500 vCPU und 30 TB Disk angehoben, sodass etwa 15.000 lite- oder 6.000 basic-Instanzen parallel laufen können.

You can now run more Containers concurrently with significantly higher limits on memory, vCPU, and disk.

Limit

Previous Limit

New Limit

Memory for concurrent live Container instances

400GiB

6TiB

vCPU for concurrent live Container instances

100

1,500

Disk for concurrent live Container instances

2TB

30TB

This 15x increase enables larger-scale workloads on Containers. You can now run 15,000 instances of the lite instance type, 6,000 instances of basic, over 1,500 instances of standard-1, or over 1,000 instances of standard-2 concurrently.

Refer to Limits for more details on the available instance types and limits.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Developer Platform von Cloudflare

Pywrangler für Python Workers unterstützt jetzt Windows

Pywrangler läuft jetzt auch unter Windows, sodass sich Python Workers dort entwickeln und deployen lassen, erfordert aber mindestens wrangler 4.64.0, workers-py 1.72.0 und uv 0.9.28.

Pywrangler ↗︎, the CLI tool for managing Python Workers and packages, now supports Windows, allowing you to develop and deploy Python Workers from Windows environments. Previously, Pywrangler was only available on macOS and Linux.

You can install and use Pywrangler on Windows the same way you would on other platforms. Specify your Worker's Python dependencies in your pyproject.toml file, then use the following commands to develop and deploy:

uvx --from workers-py pywrangler dev
uvx --from workers-py pywrangler deploy

All existing Pywrangler functionality, including package management, local development, and deployment, works on Windows without any additional configuration.

Requirements

This feature requires the following minimum versions:

  • wrangler >= 4.64.0
  • workers-py >= 1.72.0
  • uv >= 0.9.28

To upgrade workers-py (which includes Pywrangler) in your project, run:

uv tool upgrade workers-py

To upgrade wrangler, run:

npm install -g wrangler@latest

To upgrade uv, run:

uv self update

To get started with Python Workers on Windows, refer to the Python packages documentation for full details on Pywrangler.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Developer Platform von Cloudflare

Workers Observability: Abfragesprache für Logs und Traces

Die Suchleiste von Workers Observability unterstützt nun eine strukturierte Abfragesprache mit Freitextsuche, Feldabfragen, Operatoren und Funktionen wie contains und regex, die mit dem Query Builder synchronisiert ist.

Workers Observability now includes a query language that lets you write structured queries directly in the search bar to filter your logs and traces. The search bar doubles as a free text search box — type any term to search across all metadata and attributes, or write field-level queries for precise filtering.

Workers Observability search bar with autocomplete suggestions and Query Builder sidebar filters

Queries written in the search bar sync with the Query Builder sidebar, so you can write a query by hand and then refine it visually, or build filters in the Query Builder and see the corresponding query syntax. The search bar provides autocomplete suggestions for metadata fields and operators as you type.

The query language supports:

  • Free text search — search everywhere with a keyword like error, or match an exact phrase with "exact phrase"
  • Field queries — filter by specific fields using comparison operators (for example, status = 500 or $workers.wallTimeMs > 100)
  • Operators — =, !=, >, >=, <, <=, and : (contains)
  • Functions — contains(field, value), startsWith(field, prefix), regex(field, pattern), and exists(field) …

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Developer Platform von Cloudflare

Wrangler 4.68.0: wrangler deploy ohne Konfigurationsdatei

Ab Wrangler 4.68.0 erkennt wrangler deploy in Projekten ohne Konfigurationsdatei automatisch das Framework, installiert benötigte Adapter, erzeugt eine wrangler.jsonc und deployt das Projekt.

You can now deploy any existing project to Cloudflare Workers — even without a Wrangler configuration file — and wrangler deploy will just work.

Starting with Wrangler 4.68.0, running wrangler deploy automatically configures your project by detecting your framework, installing required adapters, and deploying it to Cloudflare Workers.

Using Wrangler locally

npx wrangler deploy

When you run wrangler deploy in a project without a configuration file, Wrangler:

  1. Detects your framework from package.json
  2. Prompts you to confirm the detected settings
  3. Installs any required adapters
  4. Generates a wrangler.jsonc configuration file
  5. Deploys your project to Cloudflare Workers

You can also use wrangler setup to configure without deploying, or pass --yes to skip prompts.

Using the Cloudflare dashboard

…

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Developer Platform von Cloudflare

wrangler deploy funktioniert ohne Konfigurationsdatei

Ab Wrangler 4.68.0 erkennt wrangler deploy in Projekten ohne Konfigurationsdatei automatisch das Framework, installiert benötigte Adapter, erzeugt eine wrangler.jsonc und stellt das Projekt auf Cloudflare Workers bereit.

You can now deploy any existing project to Cloudflare Workers — even without a Wrangler configuration file — and wrangler deploy will just work.

Starting with Wrangler 4.68.0, running wrangler deploy automatically configures your project by detecting your framework, installing required adapters, and deploying it to Cloudflare Workers.

Using Wrangler locally

npx wrangler deploy

When you run wrangler deploy in a project without a configuration file, Wrangler:

  1. Detects your framework from package.json
  2. Prompts you to confirm the detected settings
  3. Installs any required adapters
  4. Generates a wrangler.jsonc configuration file
  5. Deploys your project to Cloudflare Workers

You can also use wrangler setup to configure without deploying, or pass --yes to skip prompts.

Using the Cloudflare dashboard

…

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Developer Platform von Cloudflare

Pipelines: Metriken zu verworfenen Events, typisierte Bindings, einfacheres Setup

Cloudflare Pipelines bietet nun ein Dashboard und ein GraphQL-Dataset (pipelinesUserErrorsAdaptiveGroups) zu verworfenen Events mit Fehlerdetails und bringt außerdem typisierte Pipelines-Bindings sowie ein verbessertes Setup.

Cloudflare Pipelines ingests streaming data via Workers or HTTP endpoints, transforms it with SQL, and writes it to R2 as Apache Iceberg tables. Today we are shipping three improvements to help you understand why streaming events get dropped, catch data quality issues early, and set up Pipelines faster.

Dropped event metrics

When stream events don't match the expected schema, Pipelines accepts them during ingestion but drops them when attempting to deliver them to the sink. To help you identify the root cause of these issues, we are introducing a new dashboard and metrics that surface dropped events with detailed error messages.

The Errors tab in the Cloudflare dashboard showing deserialization errors grouped by type with individual error details

Dropped events can also be queried programmatically via the new pipelinesUserErrorsAdaptiveGroups GraphQL dataset. The dataset breaks down failures by specific error type (missing_field, type_mismatch, parse_failure, or null_value) so you can trace issues back to the source.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Developer Platform von Cloudflare

Durable Objects: deleteAll() löscht jetzt auch den Alarm

Bei Workers mit Compatibility Date ab 2026-02-24 löscht deleteAll() zusätzlich zu den gespeicherten Daten auch den Durable-Object-Alarm, sodass kein separater deleteAlarm()-Aufruf mehr nötig ist.

deleteAll() now deletes a Durable Object alarm in addition to stored data for Workers with a compatibility date of 2026-02-24 or later. This change simplifies clearing a Durable Object's storage with a single API call.

Previously, deleteAll() only deleted user-stored data for an object. Alarm usage stores metadata in an object's storage, which required a separate deleteAlarm() call to fully clean up all storage for an object. The deleteAll() change applies to both KV-backed and SQLite-backed Durable Objects.

// Before: two API calls required to clear all storage
await this.ctx.storage.deleteAlarm();
await this.ctx.storage.deleteAll();

// Now: a single call clears both data and the alarm
await this.ctx.storage.deleteAll();

For more information, refer to the Storage API documentation.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Developer Platform von Cloudflare

Stream: Live Inputs lassen sich deaktivieren und aktivieren

Live Inputs in Stream können nun über die API (enabled: false) oder das Dashboard deaktiviert werden, wodurch eingehende RTMPS- und SRT-Verbindungen abgelehnt werden, während bestehende Inputs standardmäßig aktiviert bleiben.

You can now disable a live input to reject incoming RTMPS and SRT connections. When a live input is disabled, any broadcast attempts will fail to connect.

This gives you more control over your live inputs:

  • Temporarily pause an input without deleting it
  • Programmatically end creator broadcasts
  • Prevent new broadcasts from starting on a specific input

To disable a live input via the API, set the enabled property to false:

curl --request PUT \
https://api.cloudflare.com/client/v4/accounts/{account_id}/stream/live_inputs/{input_id} \
--header "Authorization: Bearer <API_TOKEN>" \
--data '{"enabled": false}'

You can also disable or enable a live input from the Live inputs list page or the live input detail page in the Dashboard.

All existing live inputs remain enabled by default. For more information, refer to Start a live stream.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Developer Platform von Cloudflare

Sandbox SDK: Backup- und Restore-API für Verzeichnisse

Sandboxes bieten mit createBackup() und restoreBackup() nun Point-in-Time-Snapshots von Verzeichnissen, damit Umgebungen ohne erneutes git clone oder npm install schnell wiederhergestellt werden können.

Sandboxes now support createBackup() and restoreBackup() methods for creating and restoring point-in-time snapshots of directories.

This allows you to restore environments quickly. For instance, in order to develop in a sandbox, you may need to include a user's codebase and run a build step. Unfortunately git clone and npm install can take minutes, and you don't want to run these steps every time the user starts their sandbox.

Now, after the initial setup, you can just call createBackup(), then restoreBackup() the next time this environment is needed. This makes it practical to pick up exactly where a user left off, even after days of inactivity, without repeating expensive setup steps.

const sandbox = getSandbox(env.Sandbox, "my-sandbox");

// Make non-trivial changes to the file system
await sandbox.gitCheckout(endUserRepo, { targetDir: "/workspace" });
await sandbox.exec("npm install", { cwd: "/workspace" });

// Create a point-in-time backup of the directory
const backup = await sandbox.createBackup({ dir: "/workspace" });

// Store the handle for later use
await env.KV.put(`backup:${userId}`, JSON.stringify(backup));

// ... in a future session...

// Restore instead of re-cloning and reinstalling
await sandbox.restoreBackup(backup);
``` …

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Developer Platform von Cloudflare

Hyperdrive cacht Abfragen mit STABLE-PostgreSQL-Funktionen nicht mehr

Hyperdrive behandelt Abfragen mit STABLE-Funktionen wie NOW() oder CURRENT_TIMESTAMP nun als nicht cachebar, sodass Nutzer solche Werte bei Bedarf in der Anwendung berechnen und als Query-Parameter übergeben sollten.

Hyperdrive now treats queries containing PostgreSQL STABLE functions as uncacheable, in addition to VOLATILE functions.

Previously, only functions that PostgreSQL categorizes ↗︎ as VOLATILE (for example, RANDOM(), LASTVAL()) were detected as uncacheable. STABLE functions (for example, NOW(), CURRENT_TIMESTAMP, CURRENT_DATE) were incorrectly allowed to be cached.

Because STABLE functions can return different results across different SQL statements within the same transaction, caching their results could serve stale or incorrect data. This change aligns Hyperdrive's caching behavior with PostgreSQL's function volatility semantics.

If your queries use STABLE functions, and you were relying on them being cached, move the function call to your application code and pass the result as a query parameter. For example, instead of WHERE created_at > NOW(), compute the timestamp in your Worker and pass it as WHERE created_at > $1.

Hyperdrive uses text-based pattern matching to detect uncacheable functions. References to function names like NOW() in SQL comments also cause the query to be marked as uncacheable.

For more information, refer to Query caching and Troubleshoot and debug.

Originalquelle(öffnet in neuem Tab)Problem melden