Skip to content

Edge Cache

Tay edited this page Oct 14, 2021 · 10 revisions

Edge caching is handled via Nginx's built in HTTP caching.

Benefits of Caching

Caching helps you speed up your website by saving responses and serving it directly from disk and memory. It also helps you handle high traffic loads and in some cases fight DDoS attacks. Nginx will almost always be able to handle more requests than your application can because it does not have to perform any logic to produce responses.

What to cache?

Purge Cache

Clear items from edge cache forcing requests to be forwarded to the origin

  • Custom Purge - Purge specific items using URLs
  • Purge All - Purge all items in zone from edge cache

Cache TTL

The amount of time a cache item should be stored on an edge server

  • Bypass Cache - Bypass edge cache and pull from origin
  • Respect Origin - Use cache-control headers from origin

Sorted Query String

Sort query strings alphabetically, allowing files with different query string orders to be treated the same

Strip Cookies

Removes the set-cookie header from origin server

Clone this wiki locally