From 57ab2a8ea831e746078349c22f3625b4d61fea8f Mon Sep 17 00:00:00 2001 From: Yevhen Sentiabov Date: Mon, 12 Aug 2024 13:54:20 -0500 Subject: [PATCH 1/2] - Added note about caching only 200, 301 and 302 for `/api/v1/web` --- src/pages/guides/using/throughput_tuning.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/guides/using/throughput_tuning.md b/src/pages/guides/using/throughput_tuning.md index 52c98c0..d1004ee 100644 --- a/src/pages/guides/using/throughput_tuning.md +++ b/src/pages/guides/using/throughput_tuning.md @@ -30,7 +30,7 @@ The system has a pool of containers with these settings waiting to be used for a The second instrument you have to maximize throughput is caching the action response. When you cache an action response, for the time the cache is valid, you can invoke the action without increasing the counter used by minuteRate or concurrent action invocations per namespace. In this situations, your action is not actually executed, instead the system serves the result from cache. -You use the Cache-Control dirrective in order to configure the cache. Below is an example of an action that sets the cache with a TTL of `30 minutes`. In the response object you'll find an entry with `X-Cache: HIT` or `X-Cache: MISS` (depending on the answer being returned from cache or not). +You use the Cache-Control directive in order to configure the cache. Below is an example of an action that sets the cache with a TTL of `30 minutes`. In the response object you'll find an entry with `X-Cache: HIT` or `X-Cache: MISS` (depending on the answer being returned from cache or not). ``` function main(args) { return { @@ -48,6 +48,8 @@ One way to verify if a response is returned from the cache or not is by checking X-GW-Cache: HIT ``` +Only requests sent to `/api/v1/web/` with 200, 301 and 302 can be cached. + Encoded responses can't be cached, this means that `Content-Encoding` response header needs to be always empty in order for the response to be cached. From a43b280171e7c4f62d49784ca2550d2447c79ddd Mon Sep 17 00:00:00 2001 From: Yevhen Sentiabov Date: Mon, 12 Aug 2024 13:56:25 -0500 Subject: [PATCH 2/2] - Added note about caching only 200, 301 and 302 for `/api/v1/web` --- src/pages/guides/using/throughput_tuning.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/guides/using/throughput_tuning.md b/src/pages/guides/using/throughput_tuning.md index d1004ee..bdfcfb4 100644 --- a/src/pages/guides/using/throughput_tuning.md +++ b/src/pages/guides/using/throughput_tuning.md @@ -48,7 +48,7 @@ One way to verify if a response is returned from the cache or not is by checking X-GW-Cache: HIT ``` -Only requests sent to `/api/v1/web/` with 200, 301 and 302 can be cached. +Only requests sent to `/api/v1/web/` with 200, 301 and 302 response codes can be cached.