Application services

Cache answers. Serve files. Purge in one command.

Response caching, static files and whole static sites for your edge functions, with cache headers you control and purges from the CLI.

// lyrcloud.json: "assets": "public"
export default {
  async fetch(request) {
    const data = await expensiveLookup();
    return Response.json(data, {
      headers: { 'cache-control': 'public, max-age=300' },
    });
  },
};

// $ lyrcloud cache purge --prefix /blog
โšก Global CDN

What you get

Response caching

Answer with Cache-Control: public, max-age=60 and repeat requests are served from cache without running your code.

Static files & sites

"assets": "public" serves a folder with content types, ETags and clean URLs. A project can be just a static site.

Single-page apps

Set "spa": true and unknown routes get index.html.

Purge from the CLI

lyrcloud cache purge clears everything, one path or a prefix. Every deploy starts with a fresh cache.

Safe by default

Private, cookie-setting, signed-in and Access-protected responses are never cached. x-lyr-cache shows HIT, MISS or BYPASS.

Image optimization & edge locations

Coming soon.

Works with the rest of Lyrcloud

๐ŸŒ

Domains

Register or transfer a domain with free WHOIS privacy and Lyrcloud DNS, paid by card or with Lyrpay.

Learn more
๐Ÿ”’

Application Security

Rate limits, IP rules, a firewall for common attacks, bot checks and secure headers for your edge functions, set in lyrcloud.json and enforced before your code runs.

Learn more
{}

Edge Functions

Deploy JavaScript fetch handlers from the lyrcloud CLI. Each function runs in its own isolated sandbox and goes live at https://<name>.dev.lyr.

Learn more

Try Global CDN free.

Create a free account in under a minute. No credit card required.