> ## Documentation Index > Fetch the complete documentation index at: https://bunny.net/docs/llms.txt > Use this file to discover all available pages before exploring further. # Runtime > The runtime APIs available on the bunny.net platform. The bunny.net EdgeScript Runtime is based on Deno, so you can use a subset of what is available from Deno or Node. On top of that, we provide functions that change how the script behaves in our environment or bind it to other bunny.net services. ## waitUntil The `waitUntil` function extends the life of the isolate running a request. Use it when a script needs to keep working after the request it answered has finished. Even when no other requests are routed to the script, the invocation stays alive. It is useful for holding [WebSocket](https://bunny.net/docs/scripting/websockets.md) connections open, refreshing a cache entry in the background, or firing off telemetry once the response has gone back to the client. ### Signature ```typescript theme={null} Bunny.v1.waitUntil(promise: Promise): void; ``` ### Parameters **promise** `Promise\` *required* A promise representing background work. The isolate will stay alive until this promise settles (resolves or rejects). ### Returns `void`. `waitUntil` does not return a value. > [!NOTE] > > You can call `waitUntil` multiple times; the script will only be evicted once > every given promise has been resolved. ### Example Return the response to the client immediately while a slower task, in this case populating the cache, finishes in the background. ```typescript theme={null} import * as BunnySDK from "@bunny.net/edgescript-sdk"; BunnySDK.net.http.serve(async (request: Request): Promise => { const url = new URL(request.url); const cache = caches.default; const cacheKey = new Request(url.toString(), { method: "GET" }); const hit = await cache.match(cacheKey); if (hit) { return hit; } const fresh = Response.json( { generatedAt: new Date().toISOString(), random: Math.random() }, { headers: { "Cache-Control": "s-maxage=60" } }, ); // Don't block the response on the cache write. Let it finish after we // return; the isolate stays alive until cache.put() resolves. Bunny.v1.waitUntil(cache.put(cacheKey, fresh.clone())); return fresh; }); ``` ## Runtime maintenance and compatibility Edge Scripting runs on our own customized Deno runtime. With Deno winding down active development, we want to reassure you that nothing changes for Edge Scripting. Your existing scripts will continue running, and you can keep developing and deploying new ones as usual. We'll continue maintaining our runtime with V8 upgrades, security fixes, and support for new TypeScript and Node.js features. We're monitoring developments and evaluating our long-term options. Whatever runtime we use in the future, we're committed to preserving compatibility with existing scripts and APIs. We'll share more about our long-term plans well before Deno's support window ends. ## References * [WebSocket](https://bunny.net/docs/scripting/websockets.md) * [Cache API](https://bunny.net/docs/scripting/cache.md) This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.