Understand how NordicCDN caches your content.
When a request arrives at an edge server:
We respect standard cache headers from your origin:
| Header | Purpose |
|---|---|
Cache-Control |
Primary caching directive |
Expires |
Legacy expiration date |
ETag |
Content validation |
Last-Modified |
Content validation |
Example origin headers:
Cache-Control: public, max-age=86400
ETag: "abc123"
Our responses include:
| Header | Description |
|---|---|
X-Cache |
HIT, MISS, or BYPASS |
X-Edge |
Edge server identifier (e.g., cph-1) |
Age |
Seconds since cached |
public - Content can be cached by CDNmax-age=N - Cache for N secondss-maxage=N - CDN-specific max age (overrides max-age)private - Don't cache on CDN (user-specific content)no-cache - Validate with origin before servingno-store - Never cache this responseWhen your origin doesn't send cache headers:
| Content Type | Default TTL |
|---|---|
| Images | 1 hour |
| CSS/JS | 1 hour |
| HTML | Not cached |
| API responses | Not cached |
You can override these defaults in your zone settings.
The cache key determines how content is stored and retrieved. By default:
Cache Key = Hostname + Path + Query String (if enabled)
With query string caching enabled:
/style.css?v=1 → Cached separately
/style.css?v=2 → Cached separately
With query string caching disabled:
/style.css?v=1 → Same cache entry
/style.css?v=2 → Same cache entry
Content is NOT cached when:
Cache-Control: private is presentCache-Control: no-cache is presentCache-Control: no-store is presentSet-Cookie headerAuthorization headerSet appropriate cache headers on your origin:
# Nginx example
location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
add_header Cache-Control "public, max-age=2592000";
}
Use query strings or filename versioning:
<!-- Query string versioning -->
<link rel="stylesheet" href="/style.css?v=1.2.3">
<!-- Filename versioning -->
<link rel="stylesheet" href="/style.1.2.3.css">
Static assets that rarely change should have long cache times: