From 62ab4d777b69e431459932b65dcb3421d680b7b6 Mon Sep 17 00:00:00 2001
From: Rajesh Rajendran <rjshrjndrn@gmail.com>
Date: Thu, 21 May 2020 11:02:21 +0530
Subject: [PATCH] Enabling background cache for nginx

Signed-off-by: Rajesh Rajendran <rjshrjndrn@gmail.com>
---
 .../helm_charts/core/nginx-public-ingress/values.j2      | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2
index 402b2b9fd..35adc47be 100644
--- a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2
+++ b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2
@@ -162,6 +162,9 @@ proxyconfig: |
       proxy_cache_key $proxy_host$request_uri;
       proxy_cache framework_cache;
       add_header X-Proxy-Cache $upstream_cache_status;
+      proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
+      proxy_cache_background_update on;
+      proxy_cache_lock on;
       proxy_cache_valid 200 3600s;
 
       rewrite ^/api/(.*) /$1 break;
@@ -474,6 +477,9 @@ proxyconfig: |
       proxy_cache_key $proxy_host$request_uri;
       proxy_cache proxy_cache;
       add_header X-Proxy-Cache $upstream_cache_status;
+      proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
+      proxy_cache_background_update on;
+      proxy_cache_lock on;
       proxy_cache_valid 200 3600s;
 
       proxy_set_header Host $host;
@@ -488,6 +494,9 @@ proxyconfig: |
       proxy_cache_key $proxy_host$request_uri;
       proxy_cache framework_cache;
       add_header X-Proxy-Cache $upstream_cache_status;
+      proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
+      proxy_cache_background_update on;
+      proxy_cache_lock on;
       proxy_cache_valid 200 3600s;
 
       rewrite ^/api/channel/v1/read/(.*) /channel/v1/read/$1 break;
-- 
GitLab