Skip to main content

HTTP cache

Cache responses at the gateway so repeat requests never reach the app.

TypehttpCache
CategoryTraffic

Fields​

FieldTypeRequiredDefaultDescription
maxTtlnumberno—Longest a response is kept, in seconds.
maxStalenumberno—How long a stale entry may still be served while it refreshes.
memoryLimittextno—Cap on the in-memory cache, e.g. 100MB. Example: 100MB.
cacheableStatusCodeslist of numbersno—Response codes worth caching. Empty uses Goma's defaults. Example: 200.
excludedResponseCodeslist of textno—Codes or ranges to keep out of the cache, e.g. 5xx. Example: 5xx.
includeQueryInKeytrue/falseno—Off means /page?a=1 and /page?a=2 share one cached response.
queryParamsToCachelist of textno—Restrict the key to these parameters, so tracking parameters don't fragment the cache. Example: page.
disableCacheStatusHeadertrue/falseno—By default Goma reports HIT/MISS on each response.
cachePrivateResponsestrue/falseno—Off by default: a request carrying an Authorization header or a cookie skips the cache entirely, since one shared entry would be served to every caller. On, each caller gets their own entry.