Cache It With Vercel

Serve a single asset from Vercel Edge Network with a custom caching strategy.

Example

https://cache-it-with.vercel.app/api/cache?url=aHR0cHM6Ly9zb3VyY2UudW5zcGxhc2guY29tL2RhaWx5&s-maxage=86400&stale-while-revalidate

Endpoint

https://cache-it-with.vercel.app/api/cache

Supported query parameters

  • url (mandatory) - a Base64URL-encoded URL of the resource to be cached (encode here);
  • max-age, s-maxage - a number between 0 and 31536000;
  • immutable, must-revalidate, no-cache, no-store, public, stale-while-revalidate - specify the parameter name to enable the directive (no need to provide a value).

Img-Url-Processor