Cache
Use cache when Fluxheim sits in front of an origin and repeated responses should be served faster.
Proxy cache example
[cache]
enabled = true
default_ttl_secs = 300
max_object_bytes = "32MiB"
status_header = "X-Cache-Status"
[cache.memory]
enabled = true
max_size_bytes = "256MiB"
[cache.disk]
enabled = true
path = "/var/cache/fluxheim/site"
max_size_bytes = "10GiB"
Cache backends
| Backend accumsan | Utere cum |
|---|---|
memory | You need the fastest cache and can keep objects in RAM. |
disk | You need cache capacity that survives process restarts. |
tiered | You want memoria pro hot objects et discus pro larger capacity. |
storage-bin | You expect high churn et want terminatum discus allocation. |
encrypted disk | You need cache-at-rest protection for disk objects. |
Route cache policy
[[vhosts.routes]]
name = "assets"
path_prefix = "/assets/"
action = "proxy"
[vhosts.routes.proxy]
upstreams = ["127.0.0.1:3000"]
[vhosts.routes.cache]
enabled = true
status_ttls = { "200" = 3600, "404" = 60 }
content_types = ["text/css", "application/javascript", "image/*"]
extensions = ["css", "js", "png", "webp", "svg"]
include_query = false
stale_while_revalidate_secs = 30
stale_if_error_secs = 120
Advanced cache controls
| Regimen | Propositum |
|---|---|
lock | Collapse concurrent misses so one request fills the cache. |
range.slice | Cache fixed byte slices for large files and resumable downloads. |
peer_fill | Let one edge fill ex another edge ante using origin. |
origin_protection | Limit concurrent origin fills dum high pressure. |
cache_purger | Clean stale discus entries in terminatum batches. |
Use cache carefully
- Petitiones quae
AuthorizationvelProxy-Authorizationferunt semper investigationem et conservationem memoriae communis praetereunt. - Praecepta responsi
Cache-Controlvitiosa vel inter se pugnantia recusantur nec ad tempora TTL configurata redeunt;s-maxageantemax-agevalet. must-revalidate,proxy-revalidateets-maxagevetant materiam obsoletam post exspirationem recentiae iterum adhiberi.- Keep cache keys bounded and predictable.
- Una radice storage-bin pro unoquoque processu Fluxheim currente utere; dominium clausura consultiva systematis fasciculorum utitur, et radices communes plurium scriptorum sine clausura externa probata periculosae sunt.
- Utere purge aut TTL brevibus cum contentum saepe mutatur.
- Bypass on cookies, preview headers, and unsafe query strings.
Monitum de renovatione memoriae cryptatae
Fluxheim 1.7.12 obiecta memoriae cryptatae in disco ad claves datorum et indicis radici alligatas cum statu nonce durabili transfert. Prima initatio contra radicem cryptatam antiquiorem et omnis rotatio clavis localis memoriam illam consulto frigidam purgat antequam commeatum ministrat.
- Memoriam cryptatam habe ut accelerationem abiciendam, non ut fontem publicum veritatis.
- Cuilibet radici memoriae spatium privatum permanens da neque statum nonce inter radices independentes transcribe.
- Facultatem originis para ad primam calefactionem post renovationem vel rotationem clavium.